Unsolved How to access nested Repeater's item property
-
Column { Repeater { id: calloutColOuter model: 3 delegate: Rectangle { id: outerDel width: 57 height: 20 Column { Repeater { id: calloutColInner model: 3 delegate: Text { text: " " color: "red" width: 10 height: 10 } } } } } }
So here, there are two nested repeater. I want to access inner repeater's item by index value. I tried accessing first item of inner repeater by giving this :- "calloutColOuter.itemAt(0).children[0].children[0].itemAt(0).text"
But this is giving error.After that i tried giving this :- calloutColOuter.itemAt(0).children[0].children[0].text
this is working good but this is printing first item's text, I want to access text of second and third item also.Any idea, how can i access Second and third item text also ?
Thanks :)
-
Give the id to each column item & try to access the children. It should work.
-
@dheerendra said in How to access nested Repeater's item property:
Give the id to each column item & try to access the children. It should work.
No it won't. The inner Column is not in the same context.
@Bhushan_Sure said in How to access nested Repeater's item property:
Any idea, how can i access Second and third item text also ?
What's your higher goal? What do you want to achieve? What you are trying to do raises some red flags.