import QtQuick 2.0 import QtQuick.Controls 1.1 import QtQuick.Controls.Styles 1.1 Rectangle{ id: main width: 200 height: 200 color: "white" Rectangle { id: rect1 x: 0 y: 0 width: 90 height: 200 color: "#fc000000" MouseArea { anchors.fill: parent onClicked: { rect1.color = "#66ff0000" } } } Rectangle { id: rect2 x: 100 y: 0 width: 90 height: 200 color: "#ff000000" MouseArea { anchors.fill: parent onClicked: { rect2.color = "#66ff0000" } } } }