Hello all,
in my application i'd like to set opacity only to the top level window but not for childs widget.
Reading the qt manual at http://doc.trolltech.com/4.5/qwidget.html seems that just add setAutoFillBackground to central widget to avoid propagation. It's correct?
This is the example image from qt page:

I wrote a test but not work:
#include <QtGui>
int main(int argc, char *argv[])
{
widget.setWindowOpacity(0.7);
box.setAutoFillBackground(true);
widget.show();
return a.exec();
}
#include <QtGui>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QWidget widget;
widget.setWindowOpacity(0.7);
QGroupBox box("Hello Sample", &widget);
box.setAutoFillBackground(true);
widget.show();
return a.exec();
}
To copy to clipboard, switch view to plain text mode
where am I wrong?
Thank you
Bookmarks