summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdriano Rezende <adriano.1.rezende@nokia.com>2012-07-03 19:21:19 +0200
committerLeonardo Sobral Cunha <leo.cunha@nokia.com>2012-07-04 13:47:47 +0200
commit98d7781e9e7fb98430edac089a479d846121f8bc (patch)
treebb72df9c633fc1f6c80c0da92b58334b0cff38d7
parentbd9cc5c12c022c6c368b51eb0d28bd6b8f8ef0ee (diff)
downloadqtquickcontrols-98d7781e9e7fb98430edac089a479d846121f8bc.tar.gz
Add key navigation manual test
Change-Id: I5419e66091a2a6a400e0a9389aaffb4637cb6f1f Reviewed-by: Leonardo Sobral Cunha <leo.cunha@nokia.com>
-rw-r--r--tests/manual/keynavigation.qml99
1 files changed, 99 insertions, 0 deletions
diff --git a/tests/manual/keynavigation.qml b/tests/manual/keynavigation.qml
new file mode 100644
index 00000000..f7718b16
--- /dev/null
+++ b/tests/manual/keynavigation.qml
@@ -0,0 +1,99 @@
+import QtQuick 2.0
+import QtDesktop 0.1
+
+ApplicationWindow {
+ width: 400
+ height: 400
+
+ Rectangle {
+ id: back
+ anchors.fill: parent
+ color: enabled ? "red" : "blue"
+ }
+
+ Column {
+ spacing: 8
+ anchors.centerIn: parent
+
+ Row {
+ Button {
+ id: button1
+ focus: true
+ text: "Button 1"
+ activeFocusOnPress: true
+ KeyNavigation.tab: button2
+ onClicked: back.enabled = !back.enabled
+ }
+ Button {
+ id: button2
+ text: "Button 2"
+ activeFocusOnPress: true
+ KeyNavigation.tab: button3
+ KeyNavigation.backtab: button1
+ onClicked: back.enabled = !back.enabled
+ }
+ Button {
+ id: button3
+ text: "Button 3"
+ activeFocusOnPress: true
+ KeyNavigation.tab: checkbox1
+ KeyNavigation.backtab: button2
+ onClicked: back.enabled = !back.enabled
+ }
+ }
+
+ Row {
+ CheckBox {
+ id: checkbox1
+ text: "Checkbox 1"
+ activeFocusOnPress: true
+ KeyNavigation.tab: checkbox2
+ KeyNavigation.backtab: button3
+ onClicked: back.enabled = !back.enabled
+ }
+ CheckBox {
+ id: checkbox2
+ text: "Checkbox 2"
+ activeFocusOnPress: true
+ KeyNavigation.tab: checkbox3
+ KeyNavigation.backtab: checkbox1
+ onClicked: back.enabled = !back.enabled
+ }
+ CheckBox {
+ id: checkbox3
+ text: "Checkbox 3"
+ activeFocusOnPress: true
+ KeyNavigation.tab: radioButton1
+ KeyNavigation.backtab: checkbox2
+ onClicked: back.enabled = !back.enabled
+ }
+ }
+
+ ButtonRow {
+ exclusive: true
+ RadioButton {
+ id: radioButton1
+ text: "RadioButton 1"
+ activeFocusOnPress: true
+ KeyNavigation.tab: radioButton2
+ KeyNavigation.backtab: checkbox3
+ onClicked: back.enabled = !back.enabled
+ }
+ RadioButton {
+ id: radioButton2
+ text: "RadioButton 2"
+ activeFocusOnPress: true
+ KeyNavigation.tab: radioButton3
+ KeyNavigation.backtab: radioButton1
+ onClicked: back.enabled = !back.enabled
+ }
+ RadioButton {
+ id: radioButton3
+ text: "RadioButton 3"
+ activeFocusOnPress: true
+ KeyNavigation.backtab: radioButton2
+ onClicked: back.enabled = !back.enabled
+ }
+ }
+ }
+}