QDockWidget Draggable Tabs

前端 未结 7 1808
执念已碎
执念已碎 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

    It looks like you've set your dock tab position to be on the top. The default is for it to be on the bottom. Then it's not as visually jarring to have the tab text right next to the title bar text.

    I don't think there's any way to do what you're proposing in Qt (eliminate the QDockWidget title bar and drag from the tab), at least not with the standard widgets. You could probably write a lot of custom code to make it happen, but that's probably not worth it.

    Instead, I'd suggest moving the tabs to the bottom (see QMainWindow::setTabPosition) or possibly one of the sides.

提交回复
热议问题