aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data/tst_pane.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/controls/data/tst_pane.qml')
-rw-r--r--tests/auto/controls/data/tst_pane.qml28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_pane.qml b/tests/auto/controls/data/tst_pane.qml
index bf79644a..18fd1cf0 100644
--- a/tests/auto/controls/data/tst_pane.qml
+++ b/tests/auto/controls/data/tst_pane.qml
@@ -79,6 +79,19 @@ TestCase {
}
}
+ Component {
+ id: pressPane
+ MouseArea {
+ width: 200
+ height: 200
+ property int pressCount
+ onPressed: ++pressCount
+ Pane {
+ anchors.fill: parent
+ }
+ }
+ }
+
function test_empty() {
var control = pane.createObject(testCase)
verify(control)
@@ -113,4 +126,19 @@ TestCase {
control.destroy()
}
+
+ function test_press() {
+ var control = pressPane.createObject(testCase)
+ verify(control)
+
+ compare(control.pressCount, 0)
+ mouseClick(control)
+ compare(control.pressCount, 0)
+
+ control.children[0].enabled = false
+ mouseClick(control)
+ compare(control.pressCount, 1)
+
+ control.destroy()
+ }
}