How to ignore click that closes/hides the contextual menu ?
I am facing a problem where an event is processed when I left click to exit from the contextual menu.
- Right click -> Contextual menu appears
- Left click anywhere but on any contextual action -> the contextual menu disappears as expected
- That left click is processed as a standard left click and initiate some stuff I don't want, I just wanted to exit from contextual menu.
How can I prevent from that ?
Hi and welcome to devnet,
What does happen ?
On what kind of widget does it happen ?
What OS ?
What Qt version ?
Win7, Qt 5.9.1
It is a QWidget that handle a plotter paint area where we draw curves.
The left click starts to edit the curve as a normal left click would do but that particular left click was just supposed to close/hide the contextual menu and nothing more.
So the issue is that clicking outside the context popup menu does close the menu but ALSO triggers
an action just as if user clicked directly on it ?
Please make a small default GUI project and try it there so we are sure its not
something in your code that does it. :)