import QtQuick 2.2 Rectangle { width: 640 height: 580 Column { anchors.left: parent.left; anchors.right: parent.right spacing: 10 MouseArea { width: 100; height: 100 hoverEnabled: true Rectangle { anchors.fill: parent color: parent.containsMouse ? "Red" : "Blue" } Text { anchors.centerIn: parent color: "white" text: parent.containsMouse ? "Hovered" : "Not Hovered" } } MouseArea { width: 100; height: 100 hoverEnabled: true Rectangle { anchors.fill: parent color: parent.containsMouse ? "Red" : "Blue" } Text { anchors.centerIn: parent color: "white" text: parent.containsMouse ? "Hovered" : "Not Hovered" } } MouseArea { width: 100; height: 100 hoverEnabled: true Rectangle { anchors.fill: parent color: parent.containsMouse ? "Red" : "Blue" } Text { anchors.centerIn: parent color: "white" text: parent.containsMouse ? "Hovered" : "Not Hovered" } } MouseArea { width: 100; height: 100 hoverEnabled: true Rectangle { anchors.fill: parent color: parent.containsMouse ? "Red" : "Blue" } Text { anchors.centerIn: parent color: "white" text: parent.containsMouse ? "Hovered" : "Not Hovered" } } } }