Problem with string -> int conversion ?

Fredrik Lundh fredrik at pythonware.com
Wed Aug 31 16:16:45 CEST 2005


Madhusudan Singh wrote:

>> 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 ?

googling for "pyqt qstring" brought up this page:

    http://www.opendocspublishing.com/pyqt/x2068.htm

</F> 






More information about the Python-list mailing list