title: Resize QDialog at a runtime
body: <p>I have a QDialog subclass containing some options of my application. Some of the options are core, the other are advanced, so I decided to put them into separeted checkable QGroupBox.
  <img src="https://i.stack.imgur.com/TfTgL.png" alt="enter image description here"><br>
  I want my dialog to shrink verticaly when the user checked off advanced options box, but I can't find the way to do it properly - the dialog size stays exactle the same
  <img src="https://i.stack.imgur.com/XOM0L.png" alt="enter image description here"><br>
  I set dialog's size policy to <em>Expanding</em>, tried to call <code>adjustSize()</code> and tried to call <code>resize()</code> method - nothing helps. I can't resize programmaticaly dialog to be smaller then it's current size (it only can become larger). At the same time, it is possible to resize it manualy.
  <img src="https://i.stack.imgur.com/x81Z5.png" alt="enter image description here"><br>
  Can anybody help me?</p>