[Qt-interest] Detecting windowOpacity support
Dušan Saiko
dusan.saiko at gmail.com
Thu Apr 23 08:40:35 CEST 2009
Hello all, hello to the qt-interest list from a new user.
My problem/question would be as follows:
I know how QWidget::windowOpacity() works and I know the constraint that
"under X11 you need to have a composite manager running, and the X11
specific _NET_WM_WINDOW_OPACITY atom needs to be supported by the window
manager you are using."
It is fine with me, just I would need to detect this situation, so I can
open a framed window instead of having black square for the non
composite window managers, when using frameless window
Qt::FramelessWindowHint and Qt::WA_TranslucentBackground.
I am looking for something like
supportsTransparency()/supportsAlphaChannel().
I am searching the internet for more than two day on this now, no luck
so far.
Have also tried some tricks like setting the opacity, drawing opaque
colors and then reading the values and comparing them back (in hope if
transparency is not supported I would see that somehow), but QWidget
behaves completely the same in both situation wheather transparency
works or not.
Does anyone have any hint for me ?
Thanks.
More information about the Qt-interest-old
mailing list