Unsolved Howto remove QMenu from QMenu
-
Hi all,
i've added a QMenu (addMenu) to a parent Qmenu, i'm however unable to figure out how to
remove this submenuQt 5.6.0
auto submenu = parentMenu->addMenu( "Foo" );
i can remove an QAction,
any idea?
Regards Auke
-
@Auke-Dirk
First get the QAction for the submenu you want to delete and then useremoveAction
QAction *menuToBeRemoved = subMenu->menuAction(); mainMenu->removeAction(menuToBeRemoved);
-
Super thanx that did the trick