[PyQt] about the argument of QLatin1Char()?

Phil Thompson phil at riverbankcomputing.co.uk
Sat Dec 8 23:12:42 GMT 2007


On Saturday 08 December 2007, DDGG wrote:
> from PyQt4 import QtCore
>
> ch = 1
> print QtCore.QLatin1Char(ch)
>
>
> Traceback (most recent call last):
>   File "test.py", line 4, in <module>
>     print QtCore.QLatin1Char(ch)
> TypeError: argument 1 of QLatin1Char() has an invalid type
>
>
> Why? QLatin1Char() function needs a argument what type is char, uchar,
> as int, isn't it?

No. char and uchar are interpreted as single character strings.

Phil


More information about the PyQt mailing list