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

Enum properties are not supported

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes