def on_autoscroll_state_changed(self, state): if state == Qt.Checked: self.is_auto_scrolling = True elif state == Qt.Unchecked: self.is_auto_scrolling = False