From 8f6436f125faae91eb472ddddbbae06dba5da671 Mon Sep 17 00:00:00 2001 From: Jan Arve Saether Date: Wed, 15 Oct 2014 13:58:34 +0200 Subject: Move action handlers to the Accessible attached object With this change, instead of writing: function accessiblePressAction() { submit() } You should write: Accessible.onPressAction: { submit() } For the moment, only 4 actions are added: press, toggle, increase and decrease. The old style action handlers are deprecated, and removed from the documentation. New style action handlers will be preferred in case an item declares both styles. Change-Id: I11919e631d8476d55540f94252757b911c44ade4 Reviewed-by: Frederik Gladhorn --- examples/quick/quick-accessibility/content/Button.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/quick/quick-accessibility/content') diff --git a/examples/quick/quick-accessibility/content/Button.qml b/examples/quick/quick-accessibility/content/Button.qml index 96704de4fe..2baa66f91a 100644 --- a/examples/quick/quick-accessibility/content/Button.qml +++ b/examples/quick/quick-accessibility/content/Button.qml @@ -42,7 +42,7 @@ Rectangle { Accessible.name: text Accessible.description: "This button does " + text Accessible.role: Accessible.Button - function accessiblePressAction() { + Accessible.onPressAction: { button.clicked() } //! [button] -- cgit v1.2.3