summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qpushbutton.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@nokia.com>2012-03-07 13:51:31 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-12 13:14:05 +0100
commiteb57da5b3ff9915d2254fdbf57992fa0320d9041 (patch)
tree47c862ddba23eaa4790eb2f7e8d10e1c5299da11 /src/widgets/widgets/qpushbutton.cpp
parent0ecec0e903f80c8657f323a51973b81cdeebcac1 (diff)
Update accessibility StateChange by custom event.
Subclass QAccessibleEvent to give details what changed in the state change. Change-Id: I9005d311e85a3c8bfa6e062833fa6a8a7dc6a4a4 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Diffstat (limited to 'src/widgets/widgets/qpushbutton.cpp')
-rw-r--r--src/widgets/widgets/qpushbutton.cpp4
1 files changed, 3 insertions, 1 deletions
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
}