Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
src_gui_accessible_qaccessible.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4#include <QtGui/qtguiglobal.h>
5
6#if QT_CONFIG(accessibility)
7#include <QAccessible>
8
9namespace src_gui_accessible_qaccessible {
10class MyWidget
11{
12 void setFocus(Qt::FocusReason reason);
13};
14QAccessibleInterface *f = nullptr;
15
16//! [1]
17typedef QAccessibleInterface *myFactoryFunction(const QString &key, QObject *);
18//! [1]
19
20//! [2]
21void MyWidget::setFocus(Qt::FocusReason reason)
22{
23 // handle custom focus setting...
24 QAccessibleEvent event(f, QAccessible::Focus);
25 QAccessible::updateAccessibility(&event);
26}
27//! [2]
28
29} // src_gui_accessible_qaccessible
30
31#endif // QT_CONFIG(accessibility)