Access child element from another component



  • Hi,
    I have:

    //Base.qml
    Item {
     property alias a: _a
    
     Rectangle {
      id: _a 
      property alias b: _b
      Text {
       id: _b
      }
     }
    }
    
    //Derived.qml
    Item {
     Base {
      a.b.text: "TEXT"
     }
    }
    

    Instantiating Derived.qml fails with "QML component is not ready". How can I access _b item via _a item from Derived.qml?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.