Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Add more content to QMenu
jesuisbenjamin last edited by
I am working on an dashboard / launcher application the prototype of which "looks like this":http://t.co/eqLsRhm
To do this I basically show() or hide() a child QWidget.
However, I am trying to find what widget fits better the role. I have been thinking of extending the QMenu class, because it inherently has this the behaviour of this dashboard.
Yet a menu's not supposed to host much content other than menu-items (basically icons+labels). Is it however possible to extend a QMenu class to add any kind of content (i.e. layouts, widgets) to it?
sigrid last edited by
You can't add layouts to a QMenu, but you can add widgets containing menus to a QMenu using "QWidgetAction":http://doc.qt.nokia.com/latest/qwidgetaction.html.