[PyQt] problem creating QApplication with argb visual

Lev Shamardin shamardin at gmail.com
Fri May 30 12:56:57 BST 2008


Hi all,

I'm trying to port ARGB window example 
(http://labs.trolltech.com/page/Graphics/Examples/Examples1) to PyQt4. I've 
wrapped all calls to Xlib with ctypes, and now stuck with the following problem:

If I pass only the Display pointer to the QApplication constructor, everything 
works fine and as expected. But if I also pass the visual and colormap I start 
to get complaints from the X11 like these and application window does not appear:

X Error: BadMatch (invalid parameter attributes) 8
   Major opcode: 1 (X_CreateWindow)
   Resource id:  0x68
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
   Extension:    155 (RENDER)
   Minor opcode: 4 (RenderCreatePicture)
   Resource id:  0x5000002
X Error: BadWindow (invalid Window parameter) 3
   Major opcode: 18 (X_ChangeProperty)
   Resource id:  0x5000002

etc...

Any ideas what can be wrong? Here is my source code just in case:
http://pastebin.ca/1034001


More information about the PyQt mailing list