aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/accessibility/content/Button.qml
diff options
context:
space:
mode:
authorMorten Johan Sorvig <morten.sorvig@nokia.com>2012-01-10 12:12:51 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-07 20:08:19 +0100
commit70966df1be02dd94ecf9a122ff9e4976245aeb92 (patch)
tree372db90105c34d0c2a72e029f4e087fdc93423b7 /examples/quick/accessibility/content/Button.qml
parent3f9b58c0890a4263730e2c06b46e7a69d4bfb62d (diff)
Improve accessibility action support for Qt Quick
Add interface_cast for the action interface. Implement actions for the following roles: Button : Press CheckBox, RadioButton : Press, Check, Uncheck Slider, Spinbox, Dial, ScrollBar : Increment, Decrement Change-Id: Ic8e0d17c709ba51655f3f4b699092baf603b6f18 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Diffstat (limited to 'examples/quick/accessibility/content/Button.qml')
-rw-r--r--examples/quick/accessibility/content/Button.qml5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/quick/accessibility/content/Button.qml b/examples/quick/accessibility/content/Button.qml
index 2c203abe11..3d5086f741 100644
--- a/examples/quick/accessibility/content/Button.qml
+++ b/examples/quick/accessibility/content/Button.qml
@@ -49,6 +49,9 @@ Rectangle {
Accessible.name: text
Accessible.description: "This button does " + text
Accessible.role: Accessible.Button
+ function accessiblePressAction() {
+ button.clicked()
+ }
signal clicked
@@ -74,7 +77,7 @@ Rectangle {
id: mouseArea
anchors.fill: parent
onClicked: {
- checked = !checked;
+ parent.clicked()
}
}
}