سؤال

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