import QtQuick 2.4import QtQuick.Window 2.2Window { id: window visible: true width: 300 height: 300 Component { id: gridDelegate GridView { id: grid z: -1 anchors { fill: parent } cellWidth: 50 cellHeight: 50 focus: true model: 500 currentIndex: 0 delegate: Image { width: 50 height: 50 source: "http://www.kinopoisk.ru/images/film_big/734349.jpg" cache: false scale: grid.currentIndex == index ? 1.3 : 1 } Keys.onPressed: { if (event.key == Qt.Key_3) { grid.model = grid.model==500 ? 0 : 500 } } } } Rectangle { id: rect anchors { left: parent.left top: parent.top } width: 100 height: 100 color: "red" property var holder MouseArea { anchors.fill: parent onClicked: { if (!!rect.holder) { rect.holder.destroy() } else { rect.holder = gridDelegate.createObject(window) } } } }}