diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-11-02 14:56:49 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-11-02 15:24:30 +0000 |
commit | ee7151d5ab29ba812a93c1231ddc59c9129a7af0 (patch) | |
tree | 71b7b4ca28db1c76d6e4339ef9db980956eb8201 /src/quicktemplates2 | |
parent | 814601e9cdf5895152cedcd1968fd2a4eecd3cd3 (diff) |
StackView: provide accessible role
QAccessible::LayeredPane:
An object that can contain layered children, e.g. in a stack.
The same accessible role is used by QStackedWidget.
Change-Id: Ia1f96afd5e084958538356e3d9033a3d88cf03c3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2')
-rw-r--r-- | src/quicktemplates2/qquickstackview.cpp | 7 | ||||
-rw-r--r-- | src/quicktemplates2/qquickstackview_p.h | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickstackview.cpp b/src/quicktemplates2/qquickstackview.cpp index a29062dd..df9ab74f 100644 --- a/src/quicktemplates2/qquickstackview.cpp +++ b/src/quicktemplates2/qquickstackview.cpp @@ -950,6 +950,13 @@ bool QQuickStackView::childMouseEventFilter(QQuickItem *item, QEvent *event) return window && !window->mouseGrabberItem(); } +#ifndef QT_NO_ACCESSIBILITY +QAccessible::Role QQuickStackView::accessibleRole() const +{ + return QAccessible::LayeredPane; +} +#endif + void QQuickStackAttachedPrivate::itemParentChanged(QQuickItem *item, QQuickItem *parent) { Q_Q(QQuickStackAttached); diff --git a/src/quicktemplates2/qquickstackview_p.h b/src/quicktemplates2/qquickstackview_p.h index 5c119627..f994f361 100644 --- a/src/quicktemplates2/qquickstackview_p.h +++ b/src/quicktemplates2/qquickstackview_p.h @@ -149,6 +149,10 @@ protected: void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override; bool childMouseEventFilter(QQuickItem *, QEvent *) override; +#ifndef QT_NO_ACCESSIBILITY + QAccessible::Role accessibleRole() const override; +#endif + private: Q_DISABLE_COPY(QQuickStackView) Q_DECLARE_PRIVATE(QQuickStackView) |