QAccessibleAttributesInterface Class

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

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

公共函数

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

详细描述

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.

成员函数文档编制

[virtual noexcept] QAccessibleAttributesInterface:: ~QAccessibleAttributesInterface ()

销毁 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 被返回。