I have a GroupBox and inside of it I have 6 checkBoxes. I want them to be checked when I check the GroupBox and unchecked when I uncheck the GroupBox, like toggling all of them.
Something like:
for box in self.GroupBox.findChildren(QtGui.QCheckBox):
if self.GroupBox.isChecked()==True:
box.setChecked ==True
else:
pixel_box.setChecked == False
How Can I do that?
These changes must be made every time the
QGroupBox
changes, so it provides the toggled signal, so a slot will be connected and the changes will be made.According to the docs:
From the above it is observed that the children are disabled, and this is an unexpected situation, but ours is to enable it.
From all of the above the following should be done:
An example that implements the above is the following: