Naahmi
9th November 2011, 18:36
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:
void Pulldown::hideEvent(QHideEvent *e)
{
if(!this->geometry().contains(QCursor::pos())) {
this->show();
}
}
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.
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:
void Pulldown::hideEvent(QHideEvent *e)
{
if(!this->geometry().contains(QCursor::pos())) {
this->show();
}
}
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.