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:

Qt Code:
  1. #include <QtGui>
  2. int main(int argc, char *argv[])
  3. {
  4. QApplication a(argc, argv);
  5.  
  6. QWidget widget;
  7. widget.setWindowOpacity(0.7);
  8. QGroupBox box("Hello Sample", &widget);
  9. box.setAutoFillBackground(true);
  10.  
  11. widget.show();
  12.  
  13. return a.exec();
  14. }
To copy to clipboard, switch view to plain text mode 

where am I wrong?
Thank you