Hi,
You could put the menubar inside the QToolbar using yourtoolbar->insertWidget( ).
Regards,
Marc
Hi,
You could put the menubar inside the QToolbar using yourtoolbar->insertWidget( ).
Regards,
Marc
sangs_shenoy (21st February 2012)
Thanks Marc for your reply. I guess I skipped mentioining that I want the menubar to be fixed and not dockable, whereas the actual toolbar should be dockable. So that would mean making two toolbars one holding the menu and the other for the toolbar? Also when I increase the width of the menu dynamically in the application, how do I trigger the other toolbar to shrink in size?
I dont need the menubar within the Toolbar essentially, is there some way of specifying a width for the QMenubar and then docking the Toolbar after this width?
Regards,
Sangeeta.
In a main window there iss vertical space for an (optional) menu bar and underneath that vertical space for a tool bar or bars. So yes, you do want your menu inside a tool bar. You can QToolBar::setFloatable() and setMovable() on the tool bar containing the menu. The QMenuBar is naturally as wide as it needs to be to hold the menu titles. The other tool bar will also take as much space as it needs to display its tools, and will get an extension menu when there is insufficient space.I dont need the menubar within the Toolbar essentially, is there some way of specifying a width for the QMenubar and then docking the Toolbar after this width?
sangs_shenoy (21st February 2012)
Thanks ChrisW67, that worked for me!
Sangeeta.
Bookmarks