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

bogus warning in QQmlComponent::createWithInitialProperties() about satisfied required property

XMLWordPrintable

      It seems that the QML engine complains at runtime about a satisfied required property:

      qrc:/qt/qml/untitled42/Main.qml: Setting initial properties failed: Main does not have a property called myP
      QList(qrc:/qt/qml/untitled42/Main.qml:4:26: Required property myP was not initialized
      It can be set via the alias property outerMyP from qrc:/qt/qml/untitled42/Main.qml
      
              component IC: Item { required property int myP; }
                                   ^
      

      despite constructing Main.qml with:
      component.createWithInitialProperties({{"outerMyP", QVariant(42));}}
      (see attached reproducer)

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

            qtqmlteam Qt Qml Team User
            sami.shalayel Sami Shalayel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes