You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using enable together with chaco and traits in PySide6 application with Python 3.10. On both macOS and Windows, stderr gets flooded with TypeError from BaseWindow._create_mouse_event():
Traceback (most recent call last):
File "enable\qt4\base_window.py", line 270, in leaveEvent
File "enable\qt4\base_window.py", line 148, in leaveEvent
File "enable\abstract_window.py", line 349, in _handle_mouse_event
File "enable\qt4\base_window.py", line 515, in _create_mouse_event
TypeError: unsupported operand type(s) for &: 'int' and 'KeyboardModifier'
The respective code reads alt_down=bool(modifiers & QtCore.Qt.AltModifier), and it seems that the problem is that many enums from the current PySide6 implementation do not automatically convert to int.
It could be sufficient to use .value() to get the int value just like this:
Thanks for the report. Unfortunately, PySide 6.4.0 changed a lot of enums in a backwards incompatible way, and it's going to take us a while to fix all the resulting damage in ETS. If you can, I'd suggest pinning PySide 6 to a version older than 6.4 for the time being.
We are using
enable
together withchaco
andtraits
inPySide6
application with Python 3.10. On both macOS and Windows, stderr gets flooded withTypeError
fromBaseWindow._create_mouse_event()
:The respective code reads
alt_down=bool(modifiers & QtCore.Qt.AltModifier),
and it seems that the problem is that many enums from the currentPySide6
implementation do not automatically convert toint
.It could be sufficient to use
.value()
to get theint
value just like this:These are the versions we use:
The text was updated successfully, but these errors were encountered: