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

There is no way to document that a QML property in a QML component is read-only or read-write.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.0.0
    • 4.8.0, 5.0.0
    • Documentation
    • None
    • a9b6b923ab870ece76891c5330fdba26ce1bf613

    Description

      For QML elements, the read-only/read-write status of a QML property is determined by traversing the C++ class hierarchy for the C++ class that instantiates the QML element. A Q_PROPERTY macro is found that has the same name as the QML property that either has a write method or not, and that determines whether the QML property is read-only or read-write.

      But for QML components, there is no C++ class specified for the QML component, so there is no C++ class hierarchy to search for a corresponding Q_PROPERTY macro, so we need a \readonly command to be able to distinguish read-only from read-write for QML properties of QML components.

      Attachments

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

        Activity

          People

            gbk Martin Smith (Qt)
            gbk Martin Smith (Qt)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes