I am building a menu and I would like to be able to click both on QAction
and QMenu
items.
When running exec
, nothing happens if I click on a QMenu
.
Even if I added an action to the QMenu
.
Is there a way to do this?
Here is what I tried:
QMenu* menu = new QMenu( "xxx", topMenu );
QAction* action = menu->menuAction();
topMenu->addAction( action );