In my QT application I use a QTabWidget for the base navigation. This QTabWidget I setup in the ui. In some of the tabs of the QTabWidget I need to have QStackedWidget to be able to "drill down in the view".
I tried adding the QStackedWidget inside the ui also but it automatically adds a page to the stack. I want to add the pages for the QStackedWidget in code instead. If I in the code try to do this the stackedWidget already have a standard page so myWidget will be the second in the stack.
MyWidget *myWidget = new MyWidget(ui.stackedWidget);
ui.stackedWidget->addWidget(myWidget);
What is the best and easiest way to setup a QStackedWidget inside QTabWidget tab?