Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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
9
namespace
src_gui_accessible_qaccessible {
10
class
MyWidget
11
{
12
void
setFocus(Qt::FocusReason reason);
13
};
14
QAccessibleInterface *f =
nullptr
;
15
16
//! [1]
17
typedef
QAccessibleInterface *myFactoryFunction(
const
QString &key, QObject *);
18
//! [1]
19
20
//! [2]
21
void
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)
qtbase
src
gui
doc
snippets
code
src_gui_accessible_qaccessible.cpp
Generated on
for Qt by
1.18.0