Gianluca,
I’ve modified example as you suggested, and animation is still jerky when running on initial setup: Qt versions 5.1.1 and 5.3.2 (Ubuntu 14.04), and 5.2.1 (embedded Linux). I’ll check how it runs on Mac OS X later when I am back home.
import QtQuick 2.0
PathView {
width: 1280
height: 720
pathItemCount: 7
preferredHighlightBegin: 0.5
preferredHighlightEnd: 0.5
highlightMoveDuration: 1000
model: ListModel {
ListElement {
color: "orange"
text: "first"
}
ListElement {
color: "lightgreen"
text: "second"
}
ListElement {
color: "orchid"
text: "third"
}
ListElement {
color: "tomato"
text: "fourth"
}
ListElement {
color: "skyblue"
text: "fifth"
}
ListElement {
color: "hotpink"
text: "sixth"
}
ListElement {
color: "darkseagreen"
text: "seventh"
}
ListElement {
color: "salmon"
text: "eightth"
}
ListElement {
color: "darkolivegreen"
text: "nineth"
}
ListElement {
color: "navy"
text: "tenth"
}
}
delegate: Item {
width: 150
height: 150
Rectangle {
id: rect
anchors.fill: parent
color: model.color
}
Text {
anchors.centerIn: parent
text: model.text
color: "white"
font.pixelSize: 24
}
Component.onCompleted: console.log("created")
Component.onDestruction: console.log("destroyed")
}
path: Path {
startX: -150
startY: height / 2
PathLine {
x: width + 150
relativeY: 0
}
}
onCurrentIndexChanged: timer.start()
Timer {
id: timer
interval: highlightMoveDuration
onTriggered: ++currentIndex
}
Component.onCompleted: ++currentIndex
}
↧