I have a group project for school that I am working on. A member of my group has created a window that has ~75 radio buttons. I want to force all of them to be "clear" or "unchecked" on a button press.
Does anyone know a good way to go about doing this? I have been looking into QObjectList but I can't simply do QObjectList *children = new QObjectList(ui->groupBox->children()); and loop them using a for loop as QObjectList does not appear to have a next method..
I have also tried to do something like
QObjectList *children = new QObjectList(ui->groupBox->children());
for(QObject *iterator = children.first(); iterator!=NULL; children.pop_front()){
iterator = children.first();
iterator->at(0)->setCheckabled(false);
}
But because iterator is a QObject, setCheckable does not exist like on a radio button.
Thoughts/hints would be appreciated.
Edit: I'll even take a hint on a way to iterate through variables with similar names. For instance, all of my radiobuttons are named RadioButton_1, RadioButton_2, etc.