title: QTabWidget Hide and Show tabs
body: <p>I have some problems with QTabWidget. In case of the missing Hide functionality I have to build my own.  According to the documentation I use removeTab and insertTab, but with insert Tab I have a problem to show the Tab page that is removed.</p>
  
  <p>I use to add</p>
  
  <pre><code>  RibbonTabContent *ribbonTabContent = new RibbonTabContent;
    QTabWidget::addTab(ribbonTabContent, tabIcon, tabName);
  </code></pre>
  
  <p>To remove  is use:</p>
  
  <pre><code>void Ribbon::hideTab(const QString &amp;tabName)
  {
    // Find ribbon tab
    for (int i = 0; i &lt; count(); i++)
    {
      if (tabText(i).toLower() == tabName.toLower())
      {
         QTabWidget::removeTab(i);
        break;
      }
    }
  }
  </code></pre>
  
  <p>Both functions are working, pWidget is always null. But now the insert function do not work well. I think there I have a problem, but do not understand my problem.</p>
  
  <pre><code>void Ribbon::showTab(const QString &amp;tabName){
  
      // Find ribbon tab
      QWidget* pWidget= QTabWidget::findChild&lt;RibbonTabContent *&gt;(tabName);
      if(pWidget){
          QTabWidget::insertTab(2,pWidget, tabName);
      }
  }
  </code></pre>
  
  <p>Maybe someone can help me out?  </p>