| 18 | | ________________________________ |
| 19 | | From: ChimeraX <ChimeraX-bugs-admin@cgl.ucsf.edu> |
| 20 | | Sent: Monday, March 14, 2022 4:24 PM |
| 21 | | Cc: chimera-programmers@cgl.ucsf.edu <chimera-programmers@cgl.ucsf.edu>; pett@cgl.ucsf.edu <pett@cgl.ucsf.edu>; Anthony James Schaefer <tony.schaefer@uga.edu>; zjp@cgl.ucsf.edu <zjp@cgl.ucsf.edu> |
| 22 | | Subject: Re: [ChimeraX] #6370: Breaking QCheckbox stateChanged signal change in Qt6 |
| 23 | | |
| 24 | | [EXTERNAL SENDER - PROCEED CAUTIOUSLY] |
| 25 | | |
| 26 | | |
| 27 | | #6370: Breaking QCheckbox stateChanged signal change in Qt6 |
| 28 | | -------------------------------------+-------------------------- |
| 29 | | Reporter: Tony Schaefer | Owner: Zach Pearson |
| 30 | | Type: defect | Status: assigned |
| 31 | | Priority: normal | Milestone: |
| 32 | | Component: Window Toolkit | Version: |
| 33 | | Resolution: | Keywords: |
| 34 | | Blocked By: | Blocking: |
| 35 | | Notify when closed: | Platform: all |
| 36 | | Project: ChimeraX | |
| 37 | | -------------------------------------+-------------------------- |
| 38 | | Changes (by pett): |
| 39 | | |
| 40 | | * cc: pett (removed) |
| 41 | | * cc: chimera-programmers (added) |
| 42 | | |
| 43 | | |
| 44 | | Comment: |
| 45 | | |
| 46 | | Hi Tony, |
| 47 | | I think the signal value has always been an integer. The problem |
| 48 | | is that CheckState changed to a Python enum in PyQt6. I think you can |
| 49 | | get the code to work as: |
| 50 | | |
| 51 | | if state == Qt.Checked.value: |
| 52 | | ... |
| 53 | | |
| 54 | | But that isn't a great solution since I believe that only PyQt6 is |
| 55 | | treating CheckState as a Python enum, so that same code will not work in |
| 56 | | PyQt5 nor in PySide6, both of which treat CheckState as an int AFAIK, |
| 57 | | which defeats the purpose of our Qt shim. I think this is just a bad |
| 58 | | decision on PyQt6's part, but we're going to need to figure out if there's |
| 59 | | something we can do in the shim to work around this issue. |
| 60 | | |
| 61 | | -- |
| 62 | | Ticket URL: <https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/6370#comment:3> |
| 63 | | ChimeraX <https://www.rbvi.ucsf.edu/chimerax/> |
| 64 | | ChimeraX Issue Tracker |
| 65 | | }}} |