Add more content to QMenu
-
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. -
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.