PDA

View Full Version : setWindowOpacity doesn't work!



nupul
19th April 2006, 10:26
I am using this function successfully on windows XP but am not able to do the same on Linux SuSE 10. I tried using the following window managers but to no avail:




metacity wmaker fvwm openbox blackbox kwin(kde default)



Can anyone run the following code and confirm whether it works on your system. Please state the name and version of the underlying window manager that you are using.






#include <QApplication>
#include <QWidget>
#include <QLabel>

using namespace Qt;

int main(int argc, char *argv[])
{
QApplication app(argc,argv);

QWidget *w=new QWidget(0,0);

QLabel *label=new QLabel("This is a label", w, 0);

w->setMinimumSize(100,100);

w->setWindowTitle("trial window");

w->setWindowOpacity(0.123);

w->show();

return app.exec();
}



Thanks

Nupul

PS: What is the alternative to make a widget window transparent?

jacek
19th April 2006, 15:22
As the docs say:
This feature is available on Mac OS X, X11 platforms that support the Composite extension, and Windows 2000 and later.
Note 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.

nupul
20th April 2006, 06:15
i know that....I wish to know if someone is able to run the code snippet i posted and let me know the corresponding window manager and version they are using. It must be running on someone's machine atleast!

wysota
21st April 2006, 12:13
Do you have the composite extension turned on in your Xorg configuration? The window manager doesn't have to do anything with Xorg configuration, so if it doesn't run on one wm, it'll not run on any other.

nupul
21st April 2006, 16:39
Do you have the composite extension turned on in your Xorg configuration? The window manager doesn't have to do anything with Xorg configuration, so if it doesn't run on one wm, it'll not run on any other.

:confused:

I don't know what you mean...could you tell me how to 'configure' or turn on that option?

Thanks

nupul

wysota
21st April 2006, 19:28
http://www.google.com/search?q=xorg+composite