import QtQuick 1.0 Item { width: 300 height: 300 Rectangle { width: 100 height: 100 color: "green" MouseArea { anchors.fill: parent onClicked: { parent.color = 'red' } } } }