import QtQuick 2.0 Rectangle { id: root width: 500 height: 600 property int duration: 10 property int count: grid.count Component { id: myDelegate Rectangle { id: wrapper property string nameData: name objectName: "wrapper" width: 80 height: 60 Text { text: index } Text { x: 40 text: wrapper.x + ", " + wrapper.y } Text { y: 20 id: textName objectName: "textName" text: name } Text { y: 40 id: textNumber objectName: "textNumber" text: number } color: GridView.isCurrentItem ? "lightsteelblue" : "white" border.width: 1 onXChanged: checkPos() onYChanged: checkPos() function checkPos() { if (Qt.point(x, y) == displaced_transitionVia) model_displaced_transitionVia.addItem(name, "") if (Qt.point(x, y) == addDisplaced_transitionVia) model_addDisplaced_transitionVia.addItem(name, "") if (Qt.point(x, y) == moveDisplaced_transitionVia) model_moveDisplaced_transitionVia.addItem(name, "") if (Qt.point(x, y) == removeDisplaced_transitionVia) model_removeDisplaced_transitionVia.addItem(name, "") } } } GridView { id: grid property int targetTransitionsDone property int displaceTransitionsDone property var displacedTargetIndexes: new Array() property var displacedTargetItems: new Array() // for QQmlListProperty types function copyList(propList) { var temp = new Array() for (var i=0; i