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

qmllint: cannot reference id outside for a Component in the same file

XMLWordPrintable

    • 4d71091a19 (qt/qtdeclarative/dev) 4d71091a19 (qt/tqtc-qtdeclarative/dev)

      import QtQuick
      import QtQuick.Window
      Window {
          visible: true
          id: w
          Component {
              Item {
                  width: w.width
              }
          }
      }
      

      produces:

      Warning: main.qml:8:20: Unqualified access
                  width: w.width
                         ^
      

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

            ulherman Ulf Hermann
            poikelin Joni Poikelin
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes