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

« back to all changes in this revision

Viewing changes to tests/auto/quick/qquicklistview/data/header.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
Rectangle {
 
4
    function changeHeader() {
 
5
        list.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
            height: 30
 
16
            width: 240
 
17
            Text {
 
18
                text: index + " " + parent.x + "," + parent.y
 
19
            }
 
20
            color: ListView.isCurrentItem ? "lightsteelblue" : "white"
 
21
        }
 
22
    }
 
23
    ListView {
 
24
        id: list
 
25
        objectName: "list"
 
26
        focus: true
 
27
        width: initialViewWidth
 
28
        height: initialViewHeight
 
29
        snapMode: ListView.SnapToItem
 
30
        model: testModel
 
31
        delegate: myDelegate
 
32
        header: Text { objectName: "header"; text: "Header " + x + "," + y; width: 100; height: 30 }
 
33
    }
 
34
    Component {
 
35
        id: header2
 
36
        Text { objectName: "header2"; text: "Header " + x + "," + y; width: 50; height: 20 }
 
37
    }
 
38
 
 
39
}