From eb57da5b3ff9915d2254fdbf57992fa0320d9041 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Wed, 7 Mar 2012 13:51:31 +0100 Subject: Update accessibility StateChange by custom event. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subclass QAccessibleEvent to give details what changed in the state change. Change-Id: I9005d311e85a3c8bfa6e062833fa6a8a7dc6a4a4 Reviewed-by: Jan-Arve Sæther --- src/widgets/widgets/qpushbutton.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/widgets/widgets/qpushbutton.cpp') diff --git a/src/widgets/widgets/qpushbutton.cpp b/src/widgets/widgets/qpushbutton.cpp index 7ca5dcb486..059b0f801c 100644 --- a/src/widgets/widgets/qpushbutton.cpp +++ b/src/widgets/widgets/qpushbutton.cpp @@ -376,7 +376,9 @@ void QPushButton::setDefault(bool enable) } update(); #ifndef QT_NO_ACCESSIBILITY - QAccessible::updateAccessibility(QAccessibleEvent(QAccessible::StateChanged, this, 0)); + QAccessible::State s; + s.defaultButton = true; + QAccessible::updateAccessibility(QAccessibleStateChangeEvent(s, this)); #endif } -- cgit v1.2.3