equal
deleted
inserted
replaced
|
1 import Qt 4.7 |
|
2 |
|
3 Rectangle { |
|
4 width: 240 |
|
5 height: 320 |
|
6 color: "#ffffff" |
|
7 Component { |
|
8 id: myDelegate |
|
9 Item { |
|
10 id: wrapper |
|
11 objectName: "wrapper" |
|
12 height: 100 |
|
13 width: 100 |
|
14 Text { |
|
15 text: index |
|
16 } |
|
17 Text { |
|
18 y: 25 |
|
19 id: textName |
|
20 objectName: "textName" |
|
21 text: name |
|
22 } |
|
23 Text { |
|
24 y: 50 |
|
25 id: textNumber |
|
26 objectName: "textNumber" |
|
27 text: number |
|
28 } |
|
29 Text { |
|
30 y: 75 |
|
31 text: wrapper.y |
|
32 } |
|
33 } |
|
34 } |
|
35 |
|
36 Component { |
|
37 id: myHighlight |
|
38 Rectangle { |
|
39 color: "lightsteelblue" |
|
40 } |
|
41 } |
|
42 |
|
43 GridView { |
|
44 id: grid |
|
45 objectName: "grid" |
|
46 width: 240 |
|
47 height: 320 |
|
48 model: testModel |
|
49 delegate: myDelegate |
|
50 highlight: myHighlight |
|
51 preferredHighlightBegin: 100 |
|
52 preferredHighlightEnd: 100 |
|
53 highlightRangeMode: "StrictlyEnforceRange" |
|
54 focus: true |
|
55 } |
|
56 } |