Remove QMenu from QPushButton
-
To create a popup menu and then assign it to a QPushButton, there's
@QPushButton::setMenu(QMenu *menu)@
but if once you have assigned the menu to the button, you want to remove it, how could you do this?
-
Or if you want only hide menu items and show again later use this:
pushButton->menu()->setVisible(false);
-
Yes, setMenu(NULL) works, thanks