~saviq/ubuntu/saucy/qtdeclarative-opensource-src/add-qtquick-delegate-range

« back to all changes in this revision

Viewing changes to tests/auto/quick/qquicklistview/data/listview-enforcerange-nohighlight.qml

  • Committer: Package Import Robot
  • Author(s): Timo Jyrinki
  • Date: 2013-02-05 14:17:19 UTC
  • Revision ID: package-import@ubuntu.com-20130205141719-qqeyml8wslpyez52
Tags: upstream-5.0.1
ImportĀ upstreamĀ versionĀ 5.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import QtQuick 2.0
 
2
 
 
3
Rectangle {
 
4
    width: 240
 
5
    height: 320
 
6
 
 
7
    Component {
 
8
        id: myDelegate
 
9
        Rectangle {
 
10
            id: wrapper
 
11
            objectName: "wrapper"
 
12
            height: 20
 
13
            width: 240
 
14
            color: "transparent"
 
15
            Text {
 
16
                text: index
 
17
            }
 
18
            Text {
 
19
                x: 30
 
20
                id: textName
 
21
                objectName: "textName"
 
22
                text: name
 
23
            }
 
24
            Text {
 
25
                x: 120
 
26
                id: textNumber
 
27
                objectName: "textNumber"
 
28
                text: number
 
29
            }
 
30
            Text {
 
31
                x: 200
 
32
                text: wrapper.y
 
33
            }
 
34
        }
 
35
    }
 
36
 
 
37
    Rectangle {     // current listview item should be always in this area
 
38
        y: 100
 
39
        height: 20
 
40
        width: 240
 
41
        color: "purple"
 
42
    }
 
43
 
 
44
    ListView {
 
45
        id: list
 
46
        objectName: "list"
 
47
        width: 240
 
48
        height: 320
 
49
        model: testModel
 
50
        delegate: myDelegate
 
51
        focus: true
 
52
 
 
53
        preferredHighlightBegin: 100
 
54
        preferredHighlightEnd: 100
 
55
        highlightRangeMode: "StrictlyEnforceRange"
 
56
 
 
57
        section.property: "number"
 
58
        section.delegate: Rectangle { width: 240; height: 10; color: "lightsteelblue" }
 
59
    }
 
60
}
 
61