Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qmlvisual / ListView / enforcerange.qml
1 import QtQuick 1.0
2
3 Item {
4     id: document
5     width: 200; height: 200
6
7     ListView {
8         id: serviceListView
9         anchors.fill: parent
10         model: 100
11
12         preferredHighlightBegin: 90
13         preferredHighlightEnd: 90
14
15         highlightRangeMode: ListView.StrictlyEnforceRange
16
17         delegate: Component {
18             Item {
19                 height: 15 + ((serviceListView.currentIndex == index) ? 20 : 0)
20                 width: 200
21                 Rectangle { width: 180; height: parent.height - 4; x: 10; y: 2; color: "red" }
22             }
23         }
24     }
25
26     Rectangle {
27         y: 90; width: 200; height: 35
28         border.color: "black"
29         color: "transparent"
30     }
31 }