diff options
Diffstat (limited to 'examples/declarative/ui-components/spinner/content/Spinner.qml')
-rw-r--r-- | examples/declarative/ui-components/spinner/content/Spinner.qml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/declarative/ui-components/spinner/content/Spinner.qml b/examples/declarative/ui-components/spinner/content/Spinner.qml index 55fc542..1c41239 100644 --- a/examples/declarative/ui-components/spinner/content/Spinner.qml +++ b/examples/declarative/ui-components/spinner/content/Spinner.qml @@ -45,21 +45,26 @@ Image { property alias delegate: view.delegate property alias currentIndex: view.currentIndex property real itemHeight: 30 + source: "spinner-bg.png" clip: true + PathView { id: view anchors.fill: parent + pathItemCount: height/itemHeight preferredHighlightBegin: 0.5 preferredHighlightEnd: 0.5 highlight: Image { source: "spinner-select.png"; width: view.width; height: itemHeight+4 } dragMargin: view.width/2 + path: Path { startX: view.width/2; startY: -itemHeight/2 PathLine { x: view.width/2; y: view.pathItemCount*itemHeight + itemHeight } } } + Keys.onDownPressed: view.incrementCurrentIndex() Keys.onUpPressed: view.decrementCurrentIndex() } |