import QtQuick 2.6 import QtQuick.Window 2.2 Window { visible: true width: 640 height: 480 title: qsTr("Hello World") ListModel { id: _contactModel ListElement { name: "Bill Smith" number: "555 3264" } ListElement { name: "John Brown" number: "555 8426" } ListElement { name: "Sam Wise" number: "555 0473" } ListElement { name: "Bill Smith" number: "555 3264" } ListElement { name: "John Brown" number: "555 8426" } ListElement { name: "Sam Wise" number: "555 0473" } ListElement { name: "Bill Smith" number: "555 3264" } ListElement { name: "John Brown" number: "555 8426" } ListElement { name: "Sam Wise" number: "555 0473" } } Component { id: _contactDelegate Item { width: 200; height: 100 Text { text: name } Text { text: number; anchors.right: parent.right } MouseArea { anchors.fill: parent onClicked: _contactModel.remove(index) } } } Transition { id: _removeTransition ParallelAnimation { NumberAnimation { property: "opacity"; to: 0; duration: 500 } NumberAnimation { properties: "x,y"; to: 0; duration: 500 } } } ListView { anchors.fill: parent model: _contactModel delegate: _contactDelegate remove: _removeTransition } }