Qt
- 1 ответ
- 0 вопросов
1
Вклад в тег
Repeater {
model: mainModel
anchors.fill: parent
Rectangle {
width: 100
height: 100
color: model.color
z: index
x: model.x
y: model.y
MouseArea {
anchors.fill: parent
onClicked: Qt.quit()
}
}
}
Repeater {
id: repeater
model: mainModel
anchors.fill: parent
property int counter: 0
Rectangle {
width: 100
height: 100
color: model.color
visible: index<=repeater.counter
z: index
x: model.x
y: model.y
MouseArea {
anchors.fill: parent
onClicked: {
repeater.counter++
}
}
}
}