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

readonly QtObject properties are not possible

    XMLWordPrintable

Details

    • f876562de8eb978cea39fe72e76c49ae51ff2f97 (qtdeclarative)

    Description

      readonly properties of type QtObject (or derivative) are not possible. Running the the following example with qmlscene:

      import QtQuick 2.3
      Item {
          readonly property QtObject myProperty: QtObject {
          }
      }
      

      Results in the error:

      file:///tmp/ReadOnlyQtOjbectProperty.qml:3 Expected token `;'
      file:///tmp/ReadOnlyQtOjbectProperty.qml:3 Expected a qualified name id
      

      By simply removing the readonly keyword, the example runs fine.

      Attachments

        Issue Links

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

          Activity

            People

              shausman Simon Hausmann
              nocnokneo Taylor Braun-Jones
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes