title: How to get opacity to main window & widgets on button click in Windows using Qt 4.8?
body: <p>I'm bit new to Qt framework, so am struggling bit in one of the requirement.</p>
  
  <p>We have to fade the main window on button click which in turns pop-up the confirmation message. With that only the pop-up message should be visible and the background should get opaque.</p>
  
  <p>Currently on clicking the button the message is displayed the background gets opaque. But the other widgets in the windows are still prominent.</p>
  
  <p>Below is the code snippet on Click event of Ok Button</p>
  
  <pre><code>void MainWindow::OkClicked()
  {
    QGraphicsOpacityEffect*   effect01  = new QGraphicsOpacityEffect();
    effect01-&gt;setOpacity(0.2);
    this-&gt;setGraphicsEffect(effect01);
    MessageDialog-&gt;updateStyles(); //Pop-up message Box
    MessageDialog-&gt;show();
  }
  </code></pre>
  
  <p>One approach can be, if we set the opacity for all widgets individually. But that won't be a good design
  Any guidance is highly appreciated.</p>