I have a QTabWidget and I want to show different widgets according to the selected tab.

I thought doing a m_tabwidget->addTab(pWidgetIWantToShow, "Title") was the way to go,but albeit the tab with the "Title" title is being created, nothing is being displayed.

As it is only one tab so far, itshould set itself to default automatically (as I understood it, at least).

Am I doing something wrong? Missing something maybe?
Qt Code:
  1. m_pTopLayout = new QVBoxLayout(this);
  2.  
  3. m_pTabWidget = new QTabWidget(this);
  4. m_pTopLayout->addWidget(m_pTabWidget);
  5.  
  6. m_pRightCB = new QSSRoundedCombo(this);
  7. m_pLeftCB = new QSSRoundedCombo(this);
  8. m_pComboLayout = new QHBoxLayout(this);
  9. m_pComboLayout->addWidget(m_pLeftCB);
  10. m_pComboLayout->addWidget(m_pRightCB);
  11. m_pTopLayout->addLayout(m_pComboLayout);
  12.  
  13. m_pHistogramWidget = new HistogramWidget();
  14. m_pTabWidget->addTab(pHistogramWidget , "Histogram");
To copy to clipboard, switch view to plain text mode