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

qmllint warns about enum values of ScrollBar

    XMLWordPrintable

Details

    • cc89f62851 (qt/qtdeclarative/dev) cc89f62851 (qt/tqtc-qtdeclarative/dev) 0e5d277bbf (qt/qtdeclarative/6.4) 0e5d277bbf (qt/tqtc-qtdeclarative/6.4)

    Description

      ScrollBar and its attached properties can only be used inside a Flickable or ScrollView; however the same does not hold for its enum values:

      Consider

       

      import QtQuick
      import QtQuick.Controls
      
      Item {
        Component.onCompleted: console.log(ScrollBar.AlwaysOn)
      }
      

      This works as expected, but triggers a warning from qmllint:

       

       

      Warning: test.qml:5:48: ScrollBar must be attached to a Flickable or ScrollView [Quick.attached-property-type]
        Component.onCompleted: console.log(ScrollBar.AlwaysOn)
                                                     ^^^^^^^^
      

       

      Attachments

        For Gerrit Dashboard: QTBUG-105590
        # Subject Branch Project Status CR V

        Activity

          People

            ulherman Ulf Hermann
            fabiankosmale Fabian Kosmale
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes