QDockWidget Draggable Tabs

前端 未结 7 1812
执念已碎
执念已碎 2020-12-31 00:59

I am using QDockWidgets and placing two of them on the left side of my application so that tabs can be used to select between them. However, Qt\'s default behavior for this

7条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-31 01:38

    I think, Tom was not too far away from a solution:

    You can set your own Widget as title bar:

    myDockingWidget->setTitleBarWidget(myTitleBar)
    

    If you design this widget to not show the dock window title, you have it. Via the signal QDockWidget::topLevelChanged your docking widget can even become informed, when it gets floating, so you could then enable the title in myTitleBar again.

提交回复
热议问题