title: Qt: How to fit content to QScrollArea
body: <p>I reimplement a <code>QScrollArea</code> and I want to add several widgets to it at runtime. The problem is, till the scrollbars are shown the content of the <code>QScrollArea</code> doesn't fit to it. Only if I add more widgets so the scrollbars shown the content fits correctly.</p>
  
  <p>I already tried this after adding widgets</p>
  
  <pre><code>this-&gt;widget()-&gt;resize(this-&gt;widget()-&gt;sizeHint());
  </code></pre>
  
  <p>or</p>
  
  <pre><code>this-&gt;widget()-&gt;adjustSize();
  </code></pre>
  
  <p>But this doesn't worked. What I have to do to resize the content? Why the content fits after the scrollbars appear?</p>