Skip to content

Commit

Permalink
Fixed an issue with toggling checkboxes in PyQt6
Browse files Browse the repository at this point in the history
  • Loading branch information
ejeschke committed Oct 19, 2024
1 parent 548660a commit 8ad0a88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/WhatsNew.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Ver 5.2.0 (unreleased)
borderpadding, borderalpha, borderlinewidth
- Deprecate Gtk.Table from GTK3 backend (switch to Gtk.Grid)
- Added experimental support for GTK4 backend
- Fixed an issue with toggling CheckBoxes in Qt6

Ver 5.1.0 (2024-05-22)
======================
Expand Down
2 changes: 1 addition & 1 deletion ginga/qtw/Widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ def set_state(self, tf):
def get_state(self):
val = self.widget.checkState()
# returns 0 (unchecked) or 2 (checked)
return (val != 0)
return (val == QtCore.Qt.CheckState.Checked)


class ToggleButton(WidgetBase):
Expand Down

0 comments on commit 8ad0a88

Please sign in to comment.