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
/
header.qml
1
import QtQuick 1.0
2
3
Rectangle {
4
function changeHeader() {
5
grid.header = header2
6
}
7
width: 240
8
height: 320
9
color: "#ffffff"
10
Component {
11
id: myDelegate
12
Rectangle {
13
id: wrapper
14
objectName: "wrapper"
15
width: 80
16
height: 60
17
border.color: "blue"
18
Text {
19
text: index
20
}
21
color: GridView.isCurrentItem ? "lightsteelblue" : "white"
22
}
23
}
24
GridView {
25
id: grid
26
objectName: "grid"
27
width: 240
28
height: 320
29
cellWidth: 80
30
cellHeight: 60
31
model: testModel
32
delegate: myDelegate
33
header: Text { objectName: "header"; text: "Header"; height: 30 }
34
}
35
36
Component {
37
id: header2
38
Text { objectName: "header2"; text: "Header 2"; height: 20 }
39
}
40
}