Hello,

i have a Qmenu with QActions like right click (context menu) and i want to disable to hide the menu if the user clicks on the desktop.

I have tryed:

Qt Code:
  1. void Pulldown::hideEvent(QHideEvent *e)
  2. {
  3. if(!this->geometry().contains(QCursor::pos())) {
  4. this->show();
  5. }
  6. }
To copy to clipboard, switch view to plain text mode 

This only works if i click in the widget and not of the Desktop and this example dont work at MAC.

There are any ways to hide ohne the menu if a user has clicked a action?

Thanks for replys.