[PyKDE] Qstring problem

Hans-Peter Jansen hpj at urpla.net
Tue Mar 1 13:16:55 GMT 2005


On Tuesday 01 March 2005 13:46, Flávio Codeço Coelho wrote:
> Hi,
>
> 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

Try e.g.:
	int(QLineEdit.text().latin1())
or:
	int(str(QLineEdit.text()))

In return it would be nice to time the variants and let us know the 
results.

Pete




More information about the PyQt mailing list