diff options
author | Sebastian Sauer <sebastian.sauer@kdab.com> | 2010-07-21 14:44:08 (GMT) |
---|---|---|
committer | Harald Fernengel <harald.fernengel@nokia.com> | 2010-07-21 14:44:08 (GMT) |
commit | de8a755a16abf0ddd0e3d8606dc6541716bb1f6f (patch) | |
tree | abaff470fc7b1d305fa4eb1006afa38a985be259 /src/gui | |
parent | f1d7cbd9efbdade9df5496dc684c2f7d22db7378 (diff) | |
download | Qt-de8a755a16abf0ddd0e3d8606dc6541716bb1f6f.zip Qt-de8a755a16abf0ddd0e3d8606dc6541716bb1f6f.tar.gz Qt-de8a755a16abf0ddd0e3d8606dc6541716bb1f6f.tar.bz2 |
Improve QAccessible for QTabBar
In a QTabBar on changing the curren tab call QAccessible::updateAccessibility to allow screen-readers like JAWS to read the tabText of the newly selected tab.
Merge-request: 662
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/qtabbar.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp index d692307..bbc7e5d 100644 --- a/src/gui/widgets/qtabbar.cpp +++ b/src/gui/widgets/qtabbar.cpp @@ -1219,6 +1219,12 @@ void QTabBar::setCurrentIndex(int index) if (oldIndex >= 0 && oldIndex < count()) d->layoutTab(oldIndex); d->layoutTab(index); +#ifndef QT_NO_ACCESSIBILITY + if (QAccessible::isActive()) { + QAccessible::updateAccessibility(this, index + 1, QAccessible::Focus); + QAccessible::updateAccessibility(this, index + 1, QAccessible::Selection); + } +#endif #ifdef QT3_SUPPORT emit selected(index); #endif |