def set_checked(self, value=True, block_events=False):
if block_events: self._widget.blockSignals(True)<EOL>self._widget.setChecked(value)<EOL>if block_events: self._widget.blockSignals(False)<EOL>return self<EOL>
This will set whether the button is checked.

Setting block_events=True will temporarily disable signals
from the button when setting the value.