PDA

View Full Version : How can I add a QCheckBox inside a context menu?



cesroc
14th June 2012, 17:08
Hello,

My context menu is done and working fine, but for what I need, it would be better have a checkbox, because I need to know if one of the options was selected or not.
I know it's possible, but I didn't find a way to do that.

My context menu has 8 actions, but some of then I can select together and some I cannot select when another one was selected before. I would like to add a check box to show to the user which option is current selected.

How can I add a checkBox inside of a context menu?

Someone can help me?

Thanks in advance
Regards

amleto
14th June 2012, 17:47
I think this is what you need to use.
http://qt-project.org/doc/qt-4.8/qaction.html#checkable-prop