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
qaccessiblequickcontrol.cpp
Go to the documentation of this file.
1// Copyright (C) 2025 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
7
8#include <QtQuick/private/qquickaccessibleattached_p.h>
9
11
16
17// Offers the action to the Accessible attached object and returns true
18// if a handler took it. Subclasses an use this function to support
19// attached object installed handlers overriding the default action.
20bool QAccessibleQuickControl::doAttachedAction(const QString &actionName)
21{
22 QQuickAccessibleAttached *attached = QQuickAccessibleAttached::attachedProperties(item());
23 return attached && attached->doAction(actionName);
24}
25
27{
28 auto keys = QAccessibleQuickItem::attributeKeys();
29 if (!keys.contains(QAccessible::Attribute::Locale))
30 keys << QAccessible::Attribute::Locale;
31
32 return keys;
33}
34
35QVariant QAccessibleQuickControl::attributeValue(QAccessible::Attribute key) const
36{
37 if (key == QAccessible::Attribute::Locale)
38 return QVariant::fromValue(control()->locale());
39
40 return QAccessibleQuickItem::attributeValue(key);
41}
42
43QQuickControl *QAccessibleQuickControl::control() const
44{
45 return static_cast<QQuickControl *>(object());
46}
47
48QT_END_NAMESPACE
bool doAttachedAction(const QString &actionName)
QVariant attributeValue(QAccessible::Attribute key) const override
QList< QAccessible::Attribute > attributeKeys() const override
QPlatformMediaRecorder * control
Combined button and popup list for selecting options.