[PyKDE] PyQt and QByteArray

Ingo Krabbe i.krabbe at dokom.net
Mon Oct 21 09:27:01 BST 2002


Ups:  The loadFromData function has a problem with my type:

  File "radar.py", line 116, in rxUpdatePicture
    x.loadFromData( str(data), int(count) )
TypeError: Argument 2 of QPixmap.loadFromData() has an invalid type

loadFromData is an overloaded member
bool loadFromData ( const uchar * buf, uint len, const char * format = 0, ColorMode mode = Auto )
bool loadFromData ( const uchar * buf, uint len, const char * format, int conversion_flags )
bool loadFromData ( const QByteArray & buf, const char * format = 0, int conversion_flags = 0 )

I would like to use the (const uchar*, uint, 0, Auto) one. How can I do
proper type conversion with pyQt or do I have to write my own interface
to perform this job ?

BYE INGO




More information about the PyQt mailing list