Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Access child element from another component
Forum Updated to NodeBB v4.3 + New Features

Access child element from another component

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 414 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MartinD
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved