- Qt 6.9
- Qt GUI
- C++ Classes
- QAccessibleAttributesInterface
- Qt 6.9.1 Reference Documentation

# 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

- List of all members, including inherited members
- QAccessibleAttributesInterface is part of Accessibility Classes.

## 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::Attribute 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 attribute is set for this object, a value of the type documented for the given key in the documentation of the QAccessible::Attribute enumeration is returned in the QVariant.

Otherwise, an invalid QVariant is returned.