[PyKDE] Qstring problem

Flávio Codeço Coelho fccoelho at fiocruz.br
Tue Mar 1 12:46:47 GMT 2005


I am trying to convert the output of a QLineEdit.text() to an integer but I an 
getting the following error message:

TypeError: int() argument must be a string or a number

if check the type of the output its easy to understand why int()   is 

<class '__main__.qt.QString'>

The above is not real code, where you read QLineEdit, please read an instance 
of this class...

My question is how do I get the string so that I can convert it to int?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20050301/2f09fbc1/attachment.bin

More information about the PyQt mailing list