Problem with string -> int conversion ?

Madhusudan Singh spammers-go-here at spam.invalid
Wed Aug 31 16:05:06 CEST 2005

Fredrik Lundh wrote:

>> The code is :
>> void Form3::getNPrange()
>> {
> what language is this?

Its python embedded in the designer workflow. pyuic extracts stuff from it,
and generates a python script from the ui.h file.

> if the callback code is Python, you should be able to add a print
> statement to the line just before the failing "int" call:
>     print repr(signalrangestr), type(signalrangestr)
>     signalrange = int(signalrangestr)
> that print statement should be all you need to figure out what
> signalrangestr really is.

Thanks for the hint.

I get :

<__main__.qt.QString object at 0xb7c1a3ec> <class '__main__.qt.QString'>

The question is :

How do I convert a QString to a plain string ?

More information about the Python-list mailing list