Thanks Peter! This was very usefull, I will dig how to use composite (with composite manager of course) effects in PyQt.
I doubt python-xlib would help here, even if it supported the XRENDER
extension. What happens in that code example is that a visual and
colormap that supports an alpha channel is allocated explicitly by the
application and then passed on to the Qt library. That requires Qt to
use the exact same display connection that was used to create the
However, PyQt most likely won't be able to use a python-xlib display
connection, since Qt eventually requires a libX11 C display and a
python one can't be cast to the C kind. You'd probably be better off
hacking in PyQt to add a way to initialize it specifying the kind of
colormap it should use, and have the C glue code to much the same as
that code example. Perhaps PyQt already can do something like that,
but that'd have to be a question for a mailing list specialised on
2008/6/23 Gustavo A. Díaz <email@example.com>:
> -------------------------------------------------------------------------> Hi Guys,
> I am currenly development a PyQt application, and where I wanted to use
> composite extensions from the X server. Example, i have an application that
> has transparency, and i wanted to use the hability to enable transparency by
> using composite manager, but dont know hot in python-xlib or if is possible
> to do it.
> For example, here a Qt (C++) app that has access to Xlib fuctions, so, i
> wanted to know if it possible with python-xlib.
> I am really newbie with xlib, so a little help will be great.
> I am attaching a little code in C++ where i think calls to xlib fuctions
> (again in C++)
> If it is possible, could some one give me a tip to translate it to python?
> or what/how i need to start writing it in python from there... since i do
> not know almost nothing of c++
> Thanks in advance! and sorry for the newbie question...
> Gustavo A. Díaz
> GDNet Projects
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> python-xlib-users mailing list