import QtQuick 2.12 import QtQuick.Window 2.12 import QtQuick.Controls 2.14 import io.qt.MainWindow 1.0 Window { visible: true width: 1080 height: 720 title: qsTr("Hello World") MainWindow{ id: mainWindow onMoveCircle: { print("received") view.currentIndex= index; } } Component { id: appDelegate Item { width: 100; height: 100 scale: PathView.iconScale Image { id: myIcon y: 20; anchors.horizontalCenter: parent.horizontalCenter source: icon } Text { anchors { top: myIcon.bottom; horizontalCenter: parent.horizontalCenter } text: name } MouseArea { anchors.fill: parent onClicked: view.currentIndex = index } } } ListModel { id: appModel ListElement { name: "Music"; icon: "pics/elem_1.png" } ListElement { name: "Movies"; icon: "pics/elem_2.png" } ListElement { name: "Camera"; icon: "pics/elem_3.png" } ListElement { name: "Calendar"; icon: "pics/elem_4.png" } ListElement { name: "Messaging"; icon: "pics/elem_5.png" } ListElement { name: "Todo List"; icon: "pics/elem_6.png" } } PathView { id: view anchors.fill: parent anchors.bottomMargin: 150 anchors.topMargin: 50 pathItemCount: 7 preferredHighlightBegin: 0.5 preferredHighlightEnd: 0.5 highlightRangeMode: PathView.StrictlyEnforceRange model: appModel delegate: appDelegate path: Path { startX: 0; startY: view.height/2 PathAttribute { name: "iconScale"; value: 0.2 } PathAttribute { name: "iconOpacity"; value: 10.2 } PathAttribute { name: "iconOrder"; value: 0 } PathLine {x: view.width / 2; y: view.height/2 } PathAttribute { name: "iconScale"; value: 1.2 } PathAttribute { name: "iconOpacity"; value: 1 } PathAttribute { name: "iconOrder"; value: 8 } PathLine {x: view.width; y: view.height/2 } } } Button{ id:draw width: 50 height: 50 x: parent.width/2-width/2 y: parent.height*0.8-height onClicked: { mainWindow.rotate() } } } SLOT z CPP void MainWindow::rotate(){ for(int i=0; i< 5; i++){ QThread::msleep(1000); emit moveCircle(idx); idx++; } } /* for(int i=0; i< 5; i++){ QThread::msleep(500); qDebug()<<"emit"; emit moveCircle(i); } }*/