I have a QCheckBox (deselect_checkbox
) which, when checked, sets another QCheckBox (first_checkbox
) and itself to False
. However, it only works every other time and I'm not sure why. Here is the code:
def deselect_func():
if self.dockwidget.deselect_checkbox.isChecked():
self.dockwidget.first_checkbox.setChecked(False)
self.dockwidget.deselect_checkbox.setChecked(False)
self.dockwidget.deselect_checkbox.stateChanged.connect(deselect_func)
How can I get the function to run everytime I check deselect_checkbox
?
Using QGIS 2.16.0 with Qt Designer 4.8.5.