[PyKDE] PyQt 4 doesn't allow to create an application, given an already open display. How to solve it?

mikos at centrum.cz mikos at centrum.cz
Wed Mar 7 20:07:53 GMT 2007


Hello,
I want to write application in PyQt 4 which will be using real transparency (ARGB visuals).
Qt 4 doesn't have native support for top level widgets with ARGB visuals, but you can
get around it by opening display with xlib / xrender and passing it to QApplication.
There is simple example how to do it (in C++):
http://zrusin.blogspot.com/2006/10/argb-windows.html

But in PyQt 4, I can't do it, QApplication in PyQt 4 doesn't allow you to pass already
opened display, visual and colormap to it. As I said, in Qt 4 it isn't problem, look here:
http://doc.trolltech.com/4.2/qapplication.html#QApplication-4

So this is only limitation of PyQt 4, not Qt 4. Can you please fix it?

Thanks,
Michal Krenek (Mikos)




More information about the PyQt mailing list