Hi Dave,
Don't know whether this will solve the problem with your app but it works on your example. I got the menu to hide when the pushbutton is clicked by doing the following:
Changed the connect statement in TestAction::createWidget() to this:
connect(wgt->btn, SIGNAL(clicked()), this, SIGNAL(triggered()));
connect(wgt->btn, SIGNAL(clicked()), this, SIGNAL(triggered()));
To copy to clipboard, switch view to plain text mode
Created "menu" on the heap in MainWindow::contextMenuEvent() and added this connect statement:
connect(te, SIGNAL(triggered()), menu, SLOT(hide()));
connect(te, SIGNAL(triggered()), menu, SLOT(hide()));
To copy to clipboard, switch view to plain text mode
Bookmarks