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

[QML] PropertyChanges can't resolve property types

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 6.4.0 Beta2
    • Fix Version/s: 6.5
    • Component/s: QML: Compiler
    • Labels:

      Description

      Using Property bindings this way

      import QtQuick
      
      Window {
          width: 640
          height: 480
          visible: true
          title: 'Resolve my color type'
      
          Item {
              id: foo
      
              states: [
                  State {
                      PropertyChanges {
                          target: foo
                          myColor: Qt.rgba(0.5, 0.5, 0.5, 0.16)
                      }
                  }        
               ]
      
              property color myColor: 'black'
          }
      }
      

      makes the linter say:

      Error: main.qml:16:21: Could not compile binding for myColor: Cannot resolve property type  for binding on myColor
      import QtQuick
      ^

        Attachments

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

          Activity

            People

            Assignee:
            qtqmlteam Qt Qml Team User
            Reporter:
            cajus Cajus Pollmeier
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes