How to add "checkable" to QMenu - using C++ code ?
-
wrote on 10 Jan 2024, 16:39 last edited by
I have looked at several examples and still have no clear no idea how to add checkable widget - preferred simple "checkbox"- to the menu.
My primary problem is how to specify "checkbox" to be used..QMenu *TEST = subMenu[index]->addMenu(" subsub TEST menu " + i );
-
I have looked at several examples and still have no clear no idea how to add checkable widget - preferred simple "checkbox"- to the menu.
My primary problem is how to specify "checkbox" to be used..QMenu *TEST = subMenu[index]->addMenu(" subsub TEST menu " + i );
wrote on 10 Jan 2024, 16:54 last edited by Pl45m4 1 Oct 2024, 16:55@AnneRanch
You can make an Action in a
QMenu
checkable withaction->setCheckable(true);
toggled(true/false)
is the signal to connect and react when action is checked/uncheckedor check it yourself with:
isChecked()
-
@AnneRanch
You can make an Action in a
QMenu
checkable withaction->setCheckable(true);
toggled(true/false)
is the signal to connect and react when action is checked/uncheckedor check it yourself with:
isChecked()
wrote on 10 Jan 2024, 18:49 last edited by@Pl45m4 Thanks, it is so stupidly simple...
I do not get why the examples are so complicated...
Oh well - one problem solved
Many thanks. -
1/3