質問

I am working on a Qt project based on QMainwindow having left and right toolbars. What is the better way to add splitter between QMainwindow and toolbars. As in Qt creator we have splitters between code editor and other panels.

Central widget, right and left toolbars with splitters in a Horizontal layout will work but... looking for a better solution.

役に立ちましたか?

解決

QToolBars have fixed height (or width if they are vertical) by design. You really should use QDockWidget instead. It acts like QToolBar in many aspects, but allows to place arbitrary content in it. Just insert QToolButtons in it to make it an analog of normal toolbar.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top