PDA

View Full Version : How to insert a widget into QMenu?



alex chpenst
24th July 2008, 17:48
Hi,

how is it possible to implement a more complex menu where a menu would contain other widgets? Is it possible to put any widget in the QMenu? For example, in the attached picture there is a whole color palette inserted in the menu. How to do things like that? In general case I would like to know how to insert a layout with other widgets into the QMenu.

Thanks for any hints!!!

aamer4yu
24th July 2008, 18:27
QMenu is itself derived from QWidget.

Why dont u subclass QMenu and add ur own layout and widgets u want ?

jpn
27th July 2008, 11:16
See QWidgetAction.