PDA

View Full Version : QMenu



toki83
22nd March 2008, 08:17
Hi!

I have a menu with several submenus. In the default implementation, when the main menu is visible, the submenus popup as the corresponding caption is highlighted by the mouse pointer. Is it possible to avoid this behavior, and make the submenus popup only after a mouse click on the captions?

I'm using Qt 4.3.

Thanks for your replies.
Luca

wysota
22nd March 2008, 08:39
I think this behaviour is following your platform style, so there is probably not much you can do without heavy changes. You can probably check the sourcecode of QMenu and find a way to block automatic expanding of menus - this probably involves setting an event filter on all menus (or the application) and blocking some event.

toki83
22nd March 2008, 11:17
Thank you wysota for your fast reply.