I have a QGroupBox containing several QRadioButtons. How do I iterate over this group to get the QRadioButtons' "objectName" and "checked" value?
Thanks
I have a QGroupBox containing several QRadioButtons. How do I iterate over this group to get the QRadioButtons' "objectName" and "checked" value?
Thanks
Use QObject::children().
The easiest way is to simply store pointers as member variables. However, you can use QObject::findChildren() or QLayout::itemAt() to access to the radio buttons still no pointers were stored. Yet another approach could be to make use of QButtonGroup or QSignalMapper to distinguish between the radio buttons.
J-P Nurmi
Thank you.
Bookmarks