qml repeater itemAt
public text v1 · immutableimport Qt 4.7
Rectangle {
width: 500
height: 500
color: "black"
Row {
Repeater {
id: therepeater
objectName: "therepeater"
model: 5
delegate: Rectangle {
color: "red"
width: (index+1)*50
height: 50
}
}
}
Rectangle {
width: 100
height: 50
x: 100
y: 200
color: "red"
MouseArea {
width: 100
height: 50
onClicked: hre();
}
}
function hre()
{
console.log("count = " + therepeater.count);
for( var i=0;i < therepeater.count; i++ )
{
var c = therepeater.itemAt(parseInt(i));
}
}
}