blob: 1dfbfe0feb150660915b089978446bd8b3192943 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import QtQuick 2.0
ListView {
id: listView
width: 400
height: 400
focus: true
model: 10
delegate: Rectangle {
width: listView.width
height: 50
color: index % 2 ? "blue" : "green"
}
snapMode: ListView.SnapOneItem
Keys.onUpPressed: flick(0,500)
Keys.onDownPressed: flick(0,-500)
}
|