PDA

View Full Version : QAction with QMenu click event



mero
13th July 2012, 21:53
Hello,

I've got QAction with set QMenu, and I have little problem.
When I click on whole button where is nothing, but when i click on little arrow on right - menu is showing.
What I need to change to showing menu when I'm clicking on whole button (not only arrow) ?

Something like this:


action->menu()->exec(QCursor::pos())

but this method is showing different that original clicking on button arror.
So what is original function to show that menu on action ?

wysota
15th July 2012, 10:49
Set the popup mode of the button associated with the action to QToolButton::InstantPopup