문제

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