Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QMainWindow Context Menu
I am using QMainWindow as ym to implement standard application window and I am using toolbars and dock widgets.
I want the Toolbars and Widgets to be showable by the users preferences. I know that QMainWindow creates a context menu for handling this behaviour. However is there any way to use this context menu in other sources (for exampe to be added under a View menu into the menu bar)? I do not want to implent the whole code to show and hide widgets again in the menubar while it is available elsewhere.
giesbert last edited by
I suggest you look at the Qt code, where it is implemented. That is the easiest way to check, whether that is usable from outside...
But I know no interface for that...
Mmmm...Thank you very much. I'll have a check...
goetz last edited by
Is "QMainWindow::createPopupMenu() ":http://doc.qt.nokia.com/stable/qmainwindow.html#createPopupMenu what you need?
[quote author="Volker" date="1295301672"]Is "QMainWindow::createPopupMenu() ":http://doc.qt.nokia.com/stable/qmainwindow.html#createPopupMenu what you need?[/quote]
Yep... Thanks Volker.... I didn't see it.