1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
import QtQuick 2.9
Flickable {
width: 480
height: 480
contentX: 0
contentWidth: width
contentHeight: height
leftMargin: 408
rightMargin: 36
maximumFlickVelocity: 0
boundsBehavior: Flickable.StopAtBounds
flickableDirection: Flickable.HorizontalFlick
PathView {
id:pathView
objectName: "pathView"
property int countclick: 0
readonly property int contentsWidth: 348
readonly property int contentsHeight: 480
width: contentsWidth
height: contentsHeight
interactive: true
cacheItemCount: 10
currentIndex: 2
pathItemCount: 4
highlightMoveDuration: 300
highlightRangeMode : PathView.StrictlyEnforceRange
preferredHighlightBegin: 0.5
preferredHighlightEnd: 0.5
snapMode : PathView.SnapOneItem
path: Path {
startX: pathView.contentsWidth / 2 - 800
startY: pathView.contentsHeight / 2 - 800
PathArc {
x: pathView.contentsWidth / 2 - 800
y: pathView.contentsHeight / 2 + 800
radiusX: 800
radiusY: 800
direction: PathArc.Clockwise
}
}
model: ListModel {
ListElement { objectName:"aqua"; name: "aqua" ;mycolor:"aqua"}
ListElement { objectName:"blue"; name: "blue" ;mycolor:"blue"}
ListElement { objectName:"blueviolet"; name: "blueviolet" ;mycolor:"blueviolet"}
ListElement { objectName:"brown"; name: "brown" ;mycolor:"brown"}
ListElement { objectName:"chartreuse"; name: "chartreuse" ;mycolor:"chartreuse"}
}
delegate: Item {
id: revolveritem
objectName: model.objectName
width: pathView.contentsWidth
height: pathView.contentsHeight
Rectangle
{
id:myRectangle
color: mycolor
width: pathView.contentsWidth -20
height: pathView.contentsHeight -20
}
}
}
}
|