PDA

View Full Version : disable QMainWindow toolbar menu?



gfunk
9th January 2007, 23:55
When using QMainWindow, you can right-click in the toolbar area to get a popup menu that displays the names of the toolbars in a checkmark list (the active toolbars are checked), and you uncheck the checkmark to remove a toolbar from the main window or check it to activate the toolbar.

How to disable this menu?

munna
10th January 2007, 04:50
setDockMenuEnabled(false);

gfunk
10th January 2007, 18:24
Above works in Qt3. For Qt4+, override in your QMainWindow class:



QMenu* createPopupMenu() { return NULL; }