I have an application which uses multiple tabs. I used QTabWidget
. On some tabs I needed to show tables, so I used QTableWidget
.
The code snippet is:
QWidget *qwgt = qPreviewTabs->widget(Index);
QTableWidget *qDrvTab = new QTableWidget();
....
....
....
QVBoxLayout *vbLyt = new QVBoxLayout();
vbLyt->addWidget(qDrvTab);
qwgt->setLayout(vbLyt);
When I add push buttons and tree widgets they all appear on the specified tab without any problem. Only the QTableWidget
refuses to show.