projects
/
profile
/
ivi
/
qtdeclarative.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git]
/
tests
/
auto
/
declarative
/
qdeclarativerepeater
/
data
/
modelChanged.qml
1
import QtQuick 1.1
2
3
Column {
4
Repeater {
5
id: repeater
6
objectName: "repeater"
7
8
property int itemsCount
9
property variant itemsFound: []
10
11
delegate: Rectangle {
12
color: "red"
13
width: (index+1)*50
14
height: 50
15
}
16
17
onModelChanged: {
18
repeater.itemsCount = repeater.count
19
var items = []
20
for (var i=0; i<repeater.count; i++)
21
items.push(repeater.itemAt(i))
22
repeater.itemsFound = items
23
}
24
}
25
}
26