3 pages circular ListView
-
I managed to create a 3 pages circular listview. However i came to this solution by a try/change/execute process. Is there someone that can help me understand the x,y coordinates of the PathLines?
Given a width of 500px for each rectangle the three points of the path are: -250, 750, 1250.
But in my opinion this doesn't make sense. I thought that the correct answer would be -250, 250, 750.@import QtQuick 2.0
Item
{
id: root
width: 500
height: 500Path { id: path startX: -(width / 2); startY: root.height / 2 PathLine { x: width + (width / 2); y: root.height / 2} PathLine { x: (2 * width) + (width / 2); y: root.height / 2} } Component { id: delegate Rectangle { width: root.width height: root.height color: model.color } } ListModel { id: model ListElement { color: "red" } ListElement { color: "green" } ListElement { color: "blue" } } PathView { anchors.fill: parent path: path clip: true delegate: delegate model: model snapMode: PathView.SnapOneItem }
}
@