summaryrefslogtreecommitdiff
path: root/tests/auto/controls/data/tst_checkbox.qml
diff options
context:
space:
mode:
authorCaroline Chao <caroline.chao@digia.com>2013-04-02 10:26:52 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-03 09:52:13 +0200
commit752d32214f2b25786ab8daf9e34eefc771cb7565 (patch)
tree20f1febe1f92cf20baadf3011a26ef6635da6239 /tests/auto/controls/data/tst_checkbox.qml
parent8e83a5747029b567a302b59b0c9b957f39b73e5e (diff)
downloadqtquickcontrols-752d32214f2b25786ab8daf9e34eefc771cb7565.tar.gz
Tests: Add test for activeFocusOnPress property
For - SpinBox - TextField - TextArea - ToolButton - Button - CheckBox - RadioButton - Slider Change-Id: I36c82c5058cfc9493d9fdb8c96c6612b1f387c0f Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'tests/auto/controls/data/tst_checkbox.qml')
-rw-r--r--tests/auto/controls/data/tst_checkbox.qml11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_checkbox.qml b/tests/auto/controls/data/tst_checkbox.qml
index ae996d01..ca12da3c 100644
--- a/tests/auto/controls/data/tst_checkbox.qml
+++ b/tests/auto/controls/data/tst_checkbox.qml
@@ -219,5 +219,16 @@ Item {
root.checkBox1.partiallyCheckedEnabled = false;
root.checkBox2.partiallyCheckedEnabled = false;
}
+
+ function test_activeFocusOnPress(){
+ checkBox.activeFocusOnPress = false
+ verify(!checkBox.activeFocus)
+ mouseClick(checkBox, checkBox.x + 1, checkBox.y + 1)
+ verify(!checkBox.activeFocus)
+ checkBox.activeFocusOnPress = true
+ verify(!checkBox.activeFocus)
+ mouseClick(checkBox, checkBox.x + 1, checkBox.y + 1)
+ verify(checkBox.activeFocus)
+ }
}
}