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
/
qdeclarativegridview
/
data
/
gridview-noCurrent.qml
1
import QtQuick 1.0
2
3
Rectangle {
4
property int current: grid.currentIndex
5
width: 240
6
height: 320
7
color: "#ffffff"
8
resources: [
9
Component {
10
id: myDelegate
11
Rectangle {
12
id: wrapper
13
objectName: "wrapper"
14
width: 80
15
height: 60
16
border.color: "blue"
17
Text {
18
text: index
19
}
20
Text {
21
x: 40
22
text: wrapper.x + ", " + wrapper.y
23
}
24
Text {
25
y: 20
26
id: textName
27
objectName: "textName"
28
text: name
29
}
30
Text {
31
y: 40
32
id: textNumber
33
objectName: "textNumber"
34
text: number
35
}
36
color: GridView.isCurrentItem ? "lightsteelblue" : "white"
37
}
38
}
39
]
40
GridView {
41
id: grid
42
objectName: "grid"
43
focus: true
44
width: 240
45
height: 320
46
currentIndex: -1
47
cellWidth: 80
48
cellHeight: 60
49
delegate: myDelegate
50
model: testModel
51
}
52
}