~loic.molinari/+junk/qtdeclarative-shadereffectsource-changes

« back to all changes in this revision

Viewing changes to tests/auto/quick/qquickgridview/data/unrequestedItems.qml

  • Committer: Loïc Molinari
  • Date: 2012-04-21 17:59:51 UTC
  • Revision ID: loic.molinari@canonical.com-20120421175951-bqx68caaf5zrp76l
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import QtQuick 2.0
 
2
 
 
3
Item {
 
4
    width: 240
 
5
    height: 320
 
6
 
 
7
    Component {
 
8
        id: myDelegate
 
9
 
 
10
        Package {
 
11
            Rectangle {
 
12
                id: leftWrapper
 
13
                objectName: "wrapper"
 
14
                Package.name: "left"
 
15
                height: 80
 
16
                width: 60
 
17
                Column {
 
18
                    Text { text: index }
 
19
                    Text { text: name }
 
20
                    Text { text: leftWrapper.x + ", " + leftWrapper.y }
 
21
                }
 
22
                color: ListView.isCurrentItem ? "lightsteelblue" : "white"
 
23
            }
 
24
            Rectangle {
 
25
                id: rightWrapper
 
26
                objectName: "wrapper"
 
27
                Package.name: "right"
 
28
                height: 80
 
29
                width: 60
 
30
                Column {
 
31
                    Text { text: index }
 
32
                    Text { text: name }
 
33
                    Text { text: rightWrapper.x + ", " + rightWrapper.y }
 
34
                }
 
35
                color: ListView.isCurrentItem ? "lightsteelblue" : "white"
 
36
            }
 
37
        }
 
38
 
 
39
    }
 
40
 
 
41
    VisualDataModel {
 
42
        id: visualModel
 
43
 
 
44
        delegate: myDelegate
 
45
        model: testModel
 
46
    }
 
47
 
 
48
    GridView {
 
49
        id: leftList
 
50
        objectName: "leftGrid"
 
51
        anchors {
 
52
            left: parent.left; top: parent.top;
 
53
            right: parent.horizontalCenter; bottom: parent.bottom
 
54
        }
 
55
        model: visualModel.parts.left
 
56
        cellWidth: 60
 
57
        cellHeight: 80
 
58
    }
 
59
 
 
60
    GridView {
 
61
        id: rightList
 
62
        objectName: "rightGrid"
 
63
        anchors {
 
64
            left: parent.horizontalCenter; top: parent.top;
 
65
            right: parent.right; bottom: parent.bottom
 
66
        }
 
67
        model: visualModel.parts.right
 
68
        cellWidth: 60
 
69
        cellHeight: 80
 
70
    }
 
71
}