Qt 6.11 is out! See what's new in the release
blog
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 useremoveActionQAction *menuToBeRemoved = subMenu->menuAction(); mainMenu->removeAction(menuToBeRemoved);