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

states + PropertyChanges = qmllint no property exists in the current element

    XMLWordPrintable

Details

    • 077b8f8df437d1cfcf67b153dd4535c36786bdee (qt/qtdeclarative/dev)

    Description

      For example for "Item.states" from Qt Documentation "qmllint" reports:

      Warning: Test19.qml:10:45: Binding assigned to "color", but no property "color" exists in the current element.
      
                  PropertyChanges { target: root; color: "red" }
                                                  ^^^^^
      Warning: Test19.qml:14:45: Binding assigned to "color", but no property "color" exists in the current element.
      
                  PropertyChanges { target: root; color: "blue" }
                                                  ^^^^^
      

      Code example from Qt documentation:

      import QtQuick 2.0
      
      Rectangle {
          id: root
          width: 100; height: 100
      
          states: [
              State {
                  name: "red_color"
                  PropertyChanges { target: root; color: "red" }
              },
              State {
                  name: "blue_color"
                  PropertyChanges { target: root; color: "blue" }
              }
          ]
      }
      

      Attachments

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

        Activity

          People

            max.goldstein Maximilian Goldstein
            evgeniy_dushistov evgeniy_dushistov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes