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

Faulty array assignment for QML_SEQUENTIAL_CONTAINER property

    XMLWordPrintable

Details

    Description

      class PieSliceListRegistration
      {
          Q_GADGET
          QML_FOREIGN(QList<PieSlice *>)
          QML_ANONYMOUS
          QML_SEQUENTIAL_CONTAINER(PieSlice *)
      }; 
      Q_PROPERTY(QList<PieSlice*> slices READ slices WRITE setSlices NOTIFY slicesChanged FINAL)
      slices: [
          PieSlice {
              color: "red"
          },
          PieSlice {
              color: "black"
          },
          PieSlice {
              color: "blue"
          }
      ]

      Assigning an array of Objects to a property that uses a QML_SEQUENTIAL_CONTAINER fails with "Cannot assign multiple values to a singular property". 

      This is an extension of the chapter 5 of  the extending-qml tutorial.

      Attachments

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

        Activity

          People

            qtqmlteam Qt Qml Team User
            olivier.decanniere Olivier De Cannière
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes