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

"Could not set initial property" error message isn't specific

XMLWordPrintable

      This code

      import QtQuick
      
      Window {
          id: window
          width: 640
          height: 480
          visible: true
      
          QtObject {
              id: qo
          }
          // Item {
          //     id: qo
          // }
      
          Component {
              id: floatAnimationComponent
      
              SequentialAnimation {
      
                  required property Item target
              }
          }
      
          Component.onCompleted: animate(qo)
      
          function animate(rect) {
              let floatAnimation = floatAnimationComponent.createObject(window.contentItem, { target: qo })
          }
      }
      

      results in

      Could not set initial property target
      

      It could be more specific, similar to the error you get when assigning imperatively after creation:

      Could not set initial property target: cannot assign QObject* to QQuickItem*
      

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

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

              Created:
              Updated:

                There are no open Gerrit changes