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

Enum properties unsupported in Qt Designer custom widgets

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.8.0
    • 6.7.1
    • PySide
    • None
    • 182e2b3c0 (dev), ae7cd3c7e (6.8), c23a2df6a (6.7), ac16495bb (dev)

    Description

      Hello,

      I'm trying out the pyside6-designer and am blocked by the fact that enum properties are not supported in custom widgets.

      To be more precise, having taken your TicTacToe example, I've modified it to have an additional property:

      class TicTacToe(QWidget):
          def __init__(self, ...):
              ...
              self._prop1 = Qt.AlignRight
      
          @Property(Qt.AlignmentFlag)
          def prop1(self):
              return self._prop1
          
          @prop1.setter
          def prop1(self, new_val):
              self._prop1 = new_val
      

      Opening the Qt designer prints the following error:

      The property "prop1" of type (unknown) is not supported yet!
      

      I know that PyQt6 is having similar support issues (it used to be supported in PyQt5, but something has fundamentally changed in Qt6 that prevents them from working properly with the dynamism of Python).

      Would you have an estimate when the support for them could be implemented?

      Thanks,
      Ivan

      Attachments

        1. pyside2840_repro.diff
          2 kB
          Friedemann Kleint

        Issue Links

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

          Activity

            People

              kleint Friedemann Kleint
              ivany4 Ivan S
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes