import QtQuick 2.1 import QtQuick.Window 2.1 Image { id: root width: 48 height: 48 property string nextIcon: "/usr/share/icons/oxygen/48x48/apps/kwin.png" source: "/usr/share/icons/oxygen/48x48/apps/plasma.png" Window { visible: true x: 0 y: 0 height: 100 width: 100 Image { width: 48 height: 48 source: root.source } } MouseArea { anchors.fill: parent onClicked: { var tmp = root.nextIcon; root.nextIcon = root.source; root.source = tmp; } } }