[PyQt] Can QCheckBox state be set without triggering stateChanged?
Doug Bell
dougb at bellz.org
Tue Apr 20 19:51:41 BST 2010
Eric Coetzee wrote:
> Hi,
>
> I have a situation where I want to set the state of a checkbox while
> inside the method that handles the stateChanged event. But I don't
> want QCheckBox.stateChanged(state) to be triggered again.
>
> Can this be done?
Yes, just do:
checkbox.blockSignals(True)
checkbox.setChecked(...)
checkbox.blockSignals(False)
Doug
More information about the PyQt
mailing list