|
|
383017 |
From 514a69659a56fda410f4ab955f03c0d2a38b52f9 Mon Sep 17 00:00:00 2001
|
|
|
383017 |
From: Piotr Mikolajczyk <piotr.mikolajczyk@qt.io>
|
|
|
383017 |
Date: Tue, 10 Nov 2020 14:58:12 +0100
|
|
|
383017 |
Subject: [PATCH 14/28] Accessibility event is sent on item's geometry change
|
|
|
383017 |
MIME-Version: 1.0
|
|
|
383017 |
Content-Type: text/plain; charset=UTF-8
|
|
|
383017 |
Content-Transfer-Encoding: 8bit
|
|
|
383017 |
|
|
|
383017 |
In case of enabled accessibility, whenever the geometry
|
|
|
383017 |
of a QQuickItem changes, accessibility module is notified
|
|
|
383017 |
by a LocationChange event. This enables responding to this
|
|
|
383017 |
by for example moving the accessibility frame on the screen.
|
|
|
383017 |
|
|
|
383017 |
Task-number: QTBUG-79611
|
|
|
383017 |
Change-Id: I808e835384ef42bba2e9aabecf4be3cda07859fe
|
|
|
383017 |
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
383017 |
(cherry picked from commit def81070668f101e1e2cbb46d586bbab64c8e00f)
|
|
|
383017 |
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
|
|
|
383017 |
---
|
|
|
383017 |
src/quick/items/qquickitem.cpp | 8 ++++++++
|
|
|
383017 |
1 file changed, 8 insertions(+)
|
|
|
383017 |
|
|
|
383017 |
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
|
|
|
383017 |
index 67c4611d9e..ddd67522b9 100644
|
|
|
383017 |
--- a/src/quick/items/qquickitem.cpp
|
|
|
383017 |
+++ b/src/quick/items/qquickitem.cpp
|
|
|
383017 |
@@ -3753,6 +3753,14 @@ void QQuickItem::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeo
|
|
|
383017 |
emit widthChanged();
|
|
|
383017 |
if (change.heightChange())
|
|
|
383017 |
emit heightChanged();
|
|
|
383017 |
+#if QT_CONFIG(accessibility)
|
|
|
383017 |
+ if (QAccessible::isActive()) {
|
|
|
383017 |
+ if (QObject *acc = QQuickAccessibleAttached::findAccessible(this)) {
|
|
|
383017 |
+ QAccessibleEvent ev(acc, QAccessible::LocationChanged);
|
|
|
383017 |
+ QAccessible::updateAccessibility(&ev;;
|
|
|
383017 |
+ }
|
|
|
383017 |
+ }
|
|
|
383017 |
+#endif
|
|
|
383017 |
}
|
|
|
383017 |
|
|
|
383017 |
/*!
|
|
|
383017 |
--
|
|
|
383017 |
2.31.1
|
|
|
383017 |
|