Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
297 views
in Technique[技术] by (71.8m points)

c++ - find object in qml by id or objectName

How can one find an element in qml by objectName or id? I want to implement similar functionality

Item {
    id: myItem
}
MyItemClass {
   onStart: {
      myclass.add_new_obj (myItem.toString)
   }
   onJobDone: {
       item_qml_id.width = width_qml
       // here item_qml_id = Item_QMLTYPE_111(0x1ee54f12312), can i find object using this value?
   }
}

My signal in c++ looks like:

void jobDone(QString item_qml_id, int width_qml)
question from:https://stackoverflow.com/questions/65932631/find-object-in-qml-by-id-or-objectname

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...