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

Custom pointMarker can't access outside the component

    XMLWordPrintable

Details

    • 0b9648e75 (dev), 5bad1a96a (6.7)

    Description

      Steps: Modify ScatterProperties example to bind properties outside the pointMarker, for example:

      pointMarker: Image {
                      property bool selected: false
                      source: "images/happy_box.png"
                      width: selected ? 96 : background.radius
                      height: selected ? 96 : 64
                  }

      And you get error: qrc:/qml/testbed/ScatterProperties.qml:80:17: ReferenceError: background is not defined

      With QML Loader and Repeater this works, so you can bind to other elements properties. Is this some simpler fix to create components into correct context / call some componentComplete once created? Or should we utilize "qquickrepeater_p.h" for the correct behavior? Custom bars misbehaves similarly so this is needed in other places too.

      Attachments

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

        Activity

          People

            tuliniemi Jere Tuliniemi
            kagro Kaj Grönholm
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes