How to add "checkable" to QMenu - using C++ code ?
-
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 );@AnneRanch
You can make an Action in a
QMenucheckable 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
QMenucheckable withaction->setCheckable(true);toggled(true/false)is the signal to connect and react when action is checked/uncheckedor check it yourself with:
isChecked()@Pl45m4 Thanks, it is so stupidly simple...
I do not get why the examples are so complicated...
Oh well - one problem solved
Many thanks. -
A Anonymous_Banned275 has marked this topic as solved on