Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1901

Enum "QVariantList" passed to Property breaks property datatype

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • None
    • 6.3.0
    • PySide
    • All
    • 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.

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            kkyzivat Keith Kyzivat
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes