QAccessibleAttributesInterface Class

The QAccessibleAttributesInterface class implements support for reporting attributes for an accessible object. More...

Header: #include <QAccessibleAttributesInterface>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
Since: Qt 6.8

Public Functions

virtual ~QAccessibleAttributesInterface()
virtual QList<QAccessible::Attribute> attributeKeys() const = 0
virtual QVariant attributeValue(QAccessible::Attribute key) const = 0

Detailed Description

Attributes are key-value pairs. Values are stored in QVariant.

The QAccessible::Attributes enumeration describes the available keys and documents which type to use for the value of each key.

While the text-specific attributes handled by QAccessibleTextInterface::attributes are specific to objects implementing text and are specific to a specific text position/offset, the attributes handled by the QAccessibleAttributesInterface can be used for objects of any role and apply for the whole object.

Classes already implementing QAccessibleTextInterface for text-specific attrtibutes may want to implement QAccessibleAttributesInterface in addition for object-specific attributes.

Member Function Documentation

[virtual noexcept] QAccessibleAttributesInterface::~QAccessibleAttributesInterface()

Destroys the QAccessibleAttributesInterface.

[pure virtual] QList<QAccessible::Attribute> QAccessibleAttributesInterface::attributeKeys() const

Returns the keys of all attributes the object supports. The QAccessible::Attribute enumeration describes available keys.

[pure virtual] QVariant QAccessibleAttributesInterface::attributeValue(QAccessible::Attribute key) const

Returns the value of the attribute key of this object.

If the specificed attribute is not set for this object, an invalid QVariant is returned.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.