title: qt resize window after widget remove
body: <p>I'm adding widget in layout</p>
  
  <pre><code>ui-&gt;horizontalLayout-&gt;addWidget(tabwidget);
  </code></pre>
  
  <p>and qmainwindow resizes itself. But then I do</p>
  
  <pre><code>tabwidget-&gt;setVisible(false);
  qs = sizeHint();
  resize(qs);
  </code></pre>
  
  <p>I get the size like tabwidget was not removed from window. </p>
  
  <p>I've made new button</p>
  
  <pre><code>void MainWindow::on_pushButton_2_clicked()
  {
      qs = sizeHint();
      resize(qs);
  }
  </code></pre>
  
  <p>and it gives correct size.</p>
  
  <p>Seems I need some update function but I can't find it. Please advice</p>