I have a QWidget
that contains a QGroupBox
, which contains QComboBox
, QLineEdit
and QCheckBox
.
I need to go around all the controls, and if the control is a QCheckBox
, ask if it is checked or not. I need to know how all the QCheckBox
are checked - the idea could be something like this:
count = 0
for control in groupbox.controls():
if control is type of QtGui.QCheckBox:
if control.isChecked:
count = count + 1
else:
print('no checked')
else:
print('no QtGui.QCheckBox')
print ('there are '+ str(count)+ 'checked')