[SOLVED]Accessing QML component property dynamically
QML and Qt Quick
3
Posts
2
Posters
910
Views
1
Watching
-
wrote on 30 Sept 2014, 12:01 last edited by
Hi,
How can we access properties of multiple qml components in a loopi.e I have a custom components "box1" "box2" "box3"....."box30"
this box has a property named "txtLabel" to store text in it.Now i have to find out which box has empty "txtLabel"
i want to do it in a for loop
like
for(var i=1; i<=30;i++)
{
console.log((box+"i").txtLabel)
}Please help me in achieving above computing.
Thanq.
-
wrote on 30 Sept 2014, 12:10 last edited by
Take a look @ "this":http://qt-project.org/doc/qt-4.8/qml-item.html#children-prop
-
wrote on 30 Sept 2014, 13:02 last edited by
Its done. That helped me. Thanq.
2/3