[Qt-interest] QMenu steals all mouse events

Jugdish jugdizh at gmail.com
Fri Feb 26 16:41:07 CET 2010


I've noticed that when a QMenu is open, it seems to steal all mouse events,
even ones that occur outside the bounds of the menu.

For example, if I create a QMenu as a context menu on top of a QWidget and
then right-click on the QWidget outside of the QMenu, it closes the context
menu but eats the mouse press event. This results in having to right-click
twice to open a new context menu -- once to close the current menu and again
to open a new one.

This is inconsistent behavior with every GUI app I've ever used on OSX and
Windows -- right-clicking outside of a context menu should both close the
current one and open a new one in the new location.

Is there any way to override the default behavior of QMenu to have it act as
such?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100226/9b26cd70/attachment.html 


More information about the Qt-interest-old mailing list