import Qt 4.6 Rectangle { id: top width: 100 height: 100 function changeCol(inParam) { inParam.color="red"; } Rectangle { id: small width: 50 height: 50 anchors.centerIn: parent color: "blue" } MouseRegion { anchors.fill: parent onClicked: top.changeCol(small) } }