Add more content to QMenu
-
wrote on 19 Aug 2011, 16:34 last edited by
Hello,
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?
Thanks.
B. -
wrote on 22 Aug 2011, 11:17 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.
1/2