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

[5.12 QML REG] Can no longer access items named 'column' from inside a Repeater

XMLWordPrintable

    • All
    • 2c16e0c30c6c5ed12af52ecac2cda128487cb379 (qt/qtdeclarative/5.12)

      Any item named 'column' can't be accessed from within a Repeater or ListView delegate.
      This is breaking user code and prints no error whatsoever, which makes difficult to debug.

      import QtQuick 2.2
      
      Item {
          id: column // Rename to foo to make it work
          width: 100; height: 100;
      
          Repeater {
              model: 1
              Rectangle {
                  color: "blue"
                  height: 100
                  anchors.left: column.left // Rename to foo to make it work
                  anchors.right: column.right // Rename to foo to make it work
              }
          }
      }
      

      Whatever new functionality Repeater and/or models have in 5.12 should be guarded by a new import version

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

            richard Richard Moe Gustavsen
            iamsergio Sergio Martins
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes