addDockWidget(Qt::BottomDockWidgetArea, DockWidget_A);
addDockWidget(Qt::BottomDockWidgetArea, DockWidget_B;
addDockWidget(Qt::BottomDockWidgetArea, DockWidget_C);
addDockWidget(Qt::BottomDockWidgetArea, DockWidget_D);
//Put DockWidget_A and DockWidget_B each in its own tab.
tabifyDockWidget(DockWidget_A, DockWidget_B);
//Now that DockWidget_B is in a tab, achieve the effect of adding a tab by
//calling splitDockWidget(). A new tab is added because the tab that contains
//DockWidget_B can only have one dock widget, thus a tab for DockWidget_C
//must necessarily be created.
splitDockWidget(DockWidget_B, DockWidget_C, Qt::Horizontal);
//Repeat the above step to add a tab for DockWidget_D.
splitDockWidget(DockWidget_C, DockWidget_D, Qt::Horizontal);
addDockWidget(Qt::BottomDockWidgetArea, DockWidget_A);
addDockWidget(Qt::BottomDockWidgetArea, DockWidget_B;
addDockWidget(Qt::BottomDockWidgetArea, DockWidget_C);
addDockWidget(Qt::BottomDockWidgetArea, DockWidget_D);
//Put DockWidget_A and DockWidget_B each in its own tab.
tabifyDockWidget(DockWidget_A, DockWidget_B);
//Now that DockWidget_B is in a tab, achieve the effect of adding a tab by
//calling splitDockWidget(). A new tab is added because the tab that contains
//DockWidget_B can only have one dock widget, thus a tab for DockWidget_C
//must necessarily be created.
splitDockWidget(DockWidget_B, DockWidget_C, Qt::Horizontal);
//Repeat the above step to add a tab for DockWidget_D.
splitDockWidget(DockWidget_C, DockWidget_D, Qt::Horizontal);
To copy to clipboard, switch view to plain text mode
Bookmarks