Skip to content

Commit

Permalink
Remove ChecksState prefix for PyQt
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Yu committed Jun 15, 2021
1 parent fe0f862 commit 2a9cd2c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ def nextCheckState(self):
"""
# Qt tri-state logic is a little odd. The default behaviour is to go from unchecked
# to partially checked. We want it to go from unchecked to checked
if self.ui.checkbox.checkState() == QtCore.Qt.CheckState.Checked:
next_state = QtCore.Qt.CheckState.Unchecked
if self.ui.checkbox.checkState() == QtCore.Qt.Checked:
next_state = QtCore.Qt.Unchecked
else:
next_state = QtCore.Qt.CheckState.Checked
next_state = QtCore.Qt.Checked
self.ui.checkbox.setCheckState(next_state)
self._tree_node.set_check_state(next_state)

Expand Down

0 comments on commit 2a9cd2c

Please sign in to comment.