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

qmllint: Tumbler: attached properties of Tumbler must be accessed through a delegate item 2

    XMLWordPrintable

Details

    Description

      After bug https://bugreports.qt.io/browse/QTBUG-104209 was fixed the qmllint stop warns about usage Tumbler in root of class defined in file, but still reports warning for proper usage of Tumbler in child elements.
      For this code:

      import QtQuick
      import QtQuick.Controls
      
      Text {                                                                                                                                                                            
          id: delegate                                                                                                                                                                  
                                                                                                                                                                                        
          readonly property real angelVal: Tumbler.displacement / (Tumbler.tumbler.visibleItemCount / 2)
          Text {
                  font.pixelSize: Math.abs(delegate.Tumbler.displacement) < 0.9 ? 3.5 : 3
          }
      }
      

      qmllint reports:

      Warning: Test11.qml:9:55: Tumbler: attached properties of Tumbler must be accessed through a delegate item
                  font.pixelSize: Math.abs(delegate.Tumbler.displacement) < 0.9 ? 3.5 : 3
                                                                                                     ^^^^^^^^^^^^
      

      Attachments

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

        Activity

          People

            qtqmlteam Qt Qml Team User
            evgeniy_dushistov evgeniy_dushistov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes