You need the following hierarchical note QLayout):
QWidget
QSplitter
QStackedWidget
...
QStackedWidget
QWidget (page)
QLayout
QTabWidget
So, the code looks something like this:
QLayout* MyLayout = new QVBoxLayout (MyPageWidget) ;
MyLayout -> setSpacing (0) ;
MyLayout -> setContentsMargins (0, 0, 0, 0) ;
MyLayout -> addWidget (MyTabWidget) ;
Tonyk source
share