import QtQuick 2.1 import QtQuick.Controls 1.1 Item { width: 600 height: 400 Timer { interval: 1000 running: true onTriggered: {console.log('onTriggered, opacity: ' + rect.opacity); rect.opacity = 0.1 } } Rectangle { id: rect width: 200 height: 200 anchors.centerIn: parent color: "red" onOpacityChanged: console.log('opacity: ' + opacity) Rectangle { color: "blue" width: 100 height: 100 anchors.centerIn: parent MouseArea { anchors.fill: parent onClicked: rect.opacity = 1 - rect.opacity } } } }