|
import QtQuick 2.4import QtQuick.Controls 1.2Rectangle { width: 400 height: 400 PathView { id: view anchors.fill: parent delegate: d model: 12; pathItemCount: 6 preferredHighlightBegin: 0.5; preferredHighlightEnd: 0.5 highlight: Rectangle{ width:45; height:45 color: "blue" } path: Path { startX: 200 startY: 200 PathArc { x: 200; y: 40 radiusX: 80; radiusY: 80 useLargeArc: true } PathArc { x: 200; y: 200 radiusX: 80; radiusY: 80 useLargeArc: true } }
Component{ id:d Button { width: 40 height: 40 text: index } } }}
我写的这个程序运行后是6个Button绕成一圈的PathView,怎样才能点击每个Button实现不同的功能,我看各个教程都是讲模式——视图和路径的问题,没有讲怎么用啊,总不能只做个好看的样子吧
|
|