Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-83800

Enum properties are not supported

XMLWordPrintable

      Defining a property of an enum type

      import QtQuick 2.0
      
      Item {
          enum Status {
              On, Off
          }
      
          id: root
          property Test.Status status: Test.Status.Off
      }
      

      Produces given error at runtime:

      qrc:/Test.qml:9:5: Test.Status - Test is not a namespace
      

      Enums as properties should be allowed.

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

            qtqmlteam Qt Qml Team User
            jacek.nijaki Jacek Nijaki
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes