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

QQmlListProperty count/size/length is a non-notifying property

    XMLWordPrintable

Details

    Description

              MultiPointTouchArea {
                  id: mpta
                  touchPoints: [
                      TouchPoint { property color color: "red" },
                      TouchPoint { property color color: "orange" },
                      TouchPoint { property color color: "lightsteelblue" },
                      TouchPoint { property color color: "green" }
                  ] }
      
              Repeater {
                  model: mpta.touchPoints.count
       ...
              }
      

      MPTA's touchPoints are a QQmlListProperty. The QQmlListProperty has a CountFunction so it should be possible to get the length of the list somehow. But regardless whether I try to use count, size, or length, I get this warning:

      depends on non-NOTIFYable properties: QQuickMultiPointTouchArea::touchPoints

      (and this is the reason tests/manual/touch/mpta-crosshairs.qml has a hard-coded 10 for the Repeater's model, instead)

      Attachments

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes