summaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/touchmouse/data/hoverMouseAreas.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/touchmouse/data/hoverMouseAreas.qml')
-rw-r--r--tests/auto/quick/touchmouse/data/hoverMouseAreas.qml39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/auto/quick/touchmouse/data/hoverMouseAreas.qml b/tests/auto/quick/touchmouse/data/hoverMouseAreas.qml
new file mode 100644
index 0000000000..1bdd0b3caf
--- /dev/null
+++ b/tests/auto/quick/touchmouse/data/hoverMouseAreas.qml
@@ -0,0 +1,39 @@
+import QtQuick 2.4
+
+Item {
+ width: 500
+ height: 500
+
+ Rectangle {
+ width: 300
+ height: 90
+ color: mouseArea1.containsMouse ? "red" : "grey"
+ x: 100
+ y: 100
+
+ MouseArea {
+ id: mouseArea1
+ objectName: "mouseArea1"
+ anchors.fill: parent
+ hoverEnabled: true
+ onPressed: parent.border.width = 4
+ onReleased: parent.border.width = 0
+ }
+ }
+ Rectangle {
+ width: 300
+ height: 100
+ color: mouseArea2.containsMouse ? "red" : "lightblue"
+ x: 100
+ y: 200
+
+ MouseArea {
+ id: mouseArea2
+ objectName: "mouseArea2"
+ anchors.fill: parent
+ hoverEnabled: true
+ onPressed: parent.border.width = 4
+ onReleased: parent.border.width = 0
+ }
+ }
+}