title: How to change the opacity of Qt MainWindow?
body: <p>How to change the opacity of the Qt MainWindow by some values?</p>
  
  <p>My main window contains nothing but just somehow I need to change the opacity using keystrokes. </p>
  
  <p>It looks like this now.</p>
  
  <p><img src="https://i.stack.imgur.com/DeHFR.png" alt="enter image description here"></p>
  
  <p>I tried to set using <code>this-&gt;setWindowOpacity(0.5);</code></p>
  
  <p>didn't get anything opacity effect. </p>
  
  <p><img src="https://i.stack.imgur.com/Sld4F.png" alt="enter image description here"></p>