aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quickcontrols/qquickcontrol/data/hoverInMouseArea.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quickcontrols/qquickcontrol/data/hoverInMouseArea.qml')
-rw-r--r--tests/auto/quickcontrols/qquickcontrol/data/hoverInMouseArea.qml40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/auto/quickcontrols/qquickcontrol/data/hoverInMouseArea.qml b/tests/auto/quickcontrols/qquickcontrol/data/hoverInMouseArea.qml
new file mode 100644
index 0000000000..e0ef55336b
--- /dev/null
+++ b/tests/auto/quickcontrols/qquickcontrol/data/hoverInMouseArea.qml
@@ -0,0 +1,40 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+import QtQuick.Controls
+
+ApplicationWindow {
+ width: 400
+ height: 400
+
+ property alias control: control
+ property alias textArea: textArea
+ property alias textField: textField
+
+ MouseArea {
+ anchors.fill: parent
+
+ Column {
+ Control {
+ id: control
+ implicitWidth: 100
+ implicitHeight: 30
+ hoverEnabled: true
+ background: Rectangle {
+ color: control.hovered ? "salmon" : "grey"
+ }
+ }
+
+ TextArea {
+ id: textArea
+ hoverEnabled: true
+ }
+
+ TextField {
+ id: textField
+ hoverEnabled: true
+ }
+ }
+ }
+}