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

Engine cannot resolve property aliases in nested inline components

XMLWordPrintable

      Code to reproduce:
       

        component Test1: QtObject {
          id: tt
          property alias name: tt.objectName
        }
      
        component Test2: Test1 { }
      
        Test2 {
          // fails to load - Cannot assign to non-existent property "name" 
          name: "test2"
          // Error: Invalid write to global property "name"
          Component.onCompleted: name = "test2"
        }
      

      Seems like if there is more than 1 level of nested inline components, property aliases cannot be resolved.

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            dgo dgo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes