import QtQuick 2.0 import QtQuickUltralite.Layers 2.2 ItemLayer { MouseArea { Rectangle { id: bgRect color: "white" width: 480 height: 272 Text { id: myText anchors.centerIn: parent color: "salmon" text: "Hello World!" font.pixelSize: 14 } } onClicked: { bgRect.color = (bgRect.color == "white" ? "salmon" : "white") myText.color = (myText.color == "salmon" ? "white" : "salmon") } } }