Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
None
-
6.3.0
-
-
333b04975c (pyside/pyside-setup/dev) 946217f6f7 (pyside/pyside-setup/6.3) 946217f6f7 (pyside/tqtc-pyside-setup/6.3) 333b04975c (pyside/tqtc-pyside-setup/dev)
Description
Ok this is a weird one.
I have a customer, Swift-navigation who has created an enum like so, stored in a 'constants.py' file that they reference around the codebase:
class QTKeys(str, Enum): QVARIANTLIST = "QVariantList" QVARIANT = "QVariant"
and they use that to register properties like so:
model = Property(QTKeys.QVARIANTLIST, fget=model)
With PySide2 this worked fine.
With PySide6, this fails with the following message when referenced from QML:
QMetaProperty::read: Unable to handle unregistered datatype '♀' for property 'Test::model'
It took me quite a while to nail down exactly why the properties were not being registered properly, but I'm glad I did, so I could report this bug.
qvariantlist-property-pyside6.7z is a full example that illustrates the problem.
If you change use_pyside=6 to use_pyside=2, it will import PySide2 instead of PySide6, and illustrate that it works in PySide2.