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

qmllint complains wrongly when changing Layout attached properties in a PropertyChanges

XMLWordPrintable

    • All
    • 80d937e9e (dev), 5b113ad16 (6.7), 3880a8902 (6.6), 6a47edf72 (tqtc/lts-6.5)

      Running qmllint over a QML file (attached) that has a state change like this

       

      Rectangle {
                  id: redRect
      
      ...
      
      }
      
       
      
                 State {
                      when: root.shouldRedRectFillWidth
                      PropertyChanges {
                          redRect.Layout.fillWidth: true
                      }
                  }
      

       

      it complains

       

      Layout must be attached to Item elements [Quick.attached-property-type]
                          redRect.Layout.fillWidth: true

       

      But the code works just fine, and it is attached to redRect that is an Item

        1. Main.qml
          0.8 kB
          Albert Astals Cid
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            ulherman Ulf Hermann
            albert.astals.cid.avid Albert Astals Cid
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: