[SOLVED]Accessing QML component property dynamically
-
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.
-
Take a look @ "this":http://qt-project.org/doc/qt-4.8/qml-item.html#children-prop
-
Its done. That helped me. Thanq.