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

Cannot assign enumeration to property inside singleton

    XMLWordPrintable

Details

    Description

      QML singleton definition:

      pragma Singleton
      import QtQml
      
      QtObject {
        enum Status {NoError, AnError}  
        property int status: AnError
        property string message: "hello"
      }

      QML Runtime output:

      file:///C:/workspace/enumtest/MySingleton.qml:7: ReferenceError: AnError is not defined
      

      Attachments

        1. enumtest.zip
          1 kB
          Maxim Bescherevnykh
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            olivier.decanniere Olivier De Cannière
            morte Maxim Bescherevnykh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes