How can I insert QDockWidget as tab

前端 未结 1 1156
终归单人心
终归单人心 2021-01-04 03:53

I have a lot of widgets in my application and I know I can drag them during runtime and place over another widget in order to merge them (both widgets are on same place and

1条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-04 04:33

    If you want to layout two or more dock widgets as tabbed windows, you can either drag one dock widget over the other (as you properly described), or do that programaticaly using QMainWindow::tabifyDockWidget(QDockWidget *first, QDockWidget *second) function. As the function description says:

    Moves second dock widget on top of first dock widget, creating a tabbed docked area in the main window.

    0 讨论(0)
提交回复
热议问题