Exactly how you do the plumbing depends on exactly how you want things arranged. However, it's something along these lines:
  • Open your project in Qt Creator
  • "Add New...", "Designer Form Class", type is "Main Window", and provide some names to add another QMainWindow derivative to your project. I'll use a class called ThingyTabInnerWindow as an example.
  • Design the new inner form.
  • Go to the source for the UI class that contains your tab widget (e.g. MainWindow)
  • In the constructor (or somewhere else that makes sense) try something like the code below. It's exactly the same as adding any other widget to a tab widget.


Qt Code:
  1. #include "thingytabinnerwindow.h"
  2.  
  3. MainWindow::MainWindow(...) {
  4. setupUi(this); // the main window's Designer UI
  5. ...
  6. // Patch in your inner window using the Designer created class
  7. ThingyTabInnerWindow *tTIW = new ThingyTabInnerWindow(this);
  8. ui->tabWidget->addTab(tTIW, tr("Thingy Tab Heading"));
  9. // connect any inner window signals to slots as needed
  10. ...
  11. }
To copy to clipboard, switch view to plain text mode