Adjust PathView transition time of decrementCurrentIndex, incrementCurrentIndex
Is it possible to change the transition time of
- Keys.onRightPressed: incrementCurrentIndex()
- Keys.onLeftPressed: decrementCurrentIndex()
I’ve got the following PathView:
- import QtQuick 1.0
- Rectangle {
- id: pageControl
- width: 360
- height: 360
- ListModel {
- id: appModel
- ListElement { pageColor: "blue" }
- ListElement { pageColor: "green" }
- ListElement { pageColor: "red" }
- ListElement { pageColor: "gray" }
- ListElement { pageColor: "black" }
- ListElement { pageColor: "purple" }
- }
- listModel: appModel
- property ListModel listModel
- Component {
- id: appDelegate
- Rectangle {
- smooth: true
- width: pageControl.width
- height: pageControl.height
- color: pageColor
- }
- }
- PathView {
- id: myPathView
- width: parent.width
- anchors.top: parent.top
- Keys.onRightPressed: incrementCurrentIndex()
- Keys.onLeftPressed: decrementCurrentIndex()
- focus: true
- interactive: true
- model: listModel
- delegate: appDelegate
- path: Path {
- startX: - pageControl.width * listModel.count / 2 + pageControl.width / 2
- startY: pageControl.height / 2
- PathLine {
- x: pageControl.width * listModel.count / 2 + pageControl.width / 2
- y: pageControl.height / 2
- }
- }
- }
- }
In the wiki example, the flicking is quite slow and it can also be adjusted, but the key events are always quite fast. Is it possible to adjust them?
Thank you!
0 replies
You must log in to post a reply. Not a member yet? Register here!

