Open mgrady3 opened 1 year ago
Looks like the PyQt6 invocation is QEvent(QEvent.registerEventType())
(see https://www.riverbankcomputing.com/pipermail/pyqt/2022-January/044476.html)
I am experiencing the same issue. Simply having PyQt6 installed alongside traitsui will trigger this error as soon as you attempt:
from traitsui.api import View
I am also using Windows 10 64-bit, Python 3.8 with pyqt6 and traitsui installed via edm
It seems like under traitsui > qt4 > toolkit.py:
line 49: _QT_TRAITS_EVENT = QtCore.QEvent.Type(QtCore.QEvent.registerEventType())
should be changed to: _QT_TRAITS_EVENT = QtCore.QEvent(QtCore.QEvent.registerEventType())
However, I do not know if this would cause other problems for older versions of pyqt, such as PyQt5 that is used with python 3.6?
Thanks for the information - we currently don't have full support for PyQt6 - Pyface should work, but I don't think we made all the changes needed for PyQt6.
So if you need Qt6, PySide < 6.4 is the current recommendation.
Hopefully we will have time to update to most recent Qt6 wrappers in the next month or two.
While testing the latest
trauitsUI
on Python 3.8 using thePyQt6
backend (all provided via EDM), I see the following traceback (truncated to just the part with the relevant line):The above stems from this line in
traitsui
: https://github.com/enthought/traitsui/blob/main/traitsui/qt4/toolkit.py#L49