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

QQmlPropertyValueSource does not work with aliased properties of inline components

    XMLWordPrintable

    Details

      Description

      When using the on <property> feature of QQmlPropertyValueSource on an aliased property of a inline component, the QML engine fails:

      Reproduction:

      import QtQuick 2.12
      import QtQuick.Controls 2.5
      
      ApplicationWindow {
          visible: true
          component MyText: Text {
              id: myText
              property alias foo: myText.text
              property string bar
              text: bar
          }
      
          MyText {
              foo: "ok"
          }
          MyText {
              Binding on bar {
                  value: "ok"
              }
          }
          MyText {
              id: myText
              Binding {
                  target: myText
                  property: "foo"
                  value: "ok"
              }
          }
          MyText {
              Binding on foo {
                  value: "ko" // QQmlApplicationEngine failed to load component
              }               // qrc:/main.qml:30:20: Cannot assign to non-existent property "foo"
          }
      }
      
      

        Attachments

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

          Activity

            People

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            grecko Pierre-Yves Siret
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes