QAccessibleAttributesInterface Class
QAccessibleAttributesInterface 类实现了对报告可访问对象属性的支持。更多
头文件: | #include <QAccessibleAttributesInterface> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
qmake: | QT += gui |
自 | Qt 6.8 |
- 所有成员(包括继承成员)的列表
- QAccessibleAttributesInterface 是辅助功能类的一部分。
公共函数
virtual | ~QAccessibleAttributesInterface() |
virtual QList<QAccessible::Attribute> | attributeKeys() const = 0 |
virtual QVariant | attributeValue(QAccessible::Attribute key) const = 0 |
详细说明
属性是键值对。值存储在QVariant 中。
QAccessible::Attribute 枚举描述了可用的键,并记录了每个键的值应使用的类型。
QAccessibleTextInterface::attributes 所处理的特定于文本的属性是特定于实现文本的对象的,并且是特定于特定文本位置/偏移量的,而QAccessibleAttributesInterface 所处理的属性可用于任何角色的对象,并适用于整个对象。
已经为特定文本属性实施QAccessibleTextInterface 的类可能还需要为特定对象属性实施QAccessibleAttributesInterface 。
成员函数文档
[virtual noexcept]
QAccessibleAttributesInterface::~QAccessibleAttributesInterface()
摧毁QAccessibleAttributesInterface.
[pure virtual]
QList<QAccessible::Attribute> QAccessibleAttributesInterface::attributeKeys() const
返回对象支持的所有属性的键值。QAccessible::Attribute 枚举描述了可用的键。
[pure virtual]
QVariant QAccessibleAttributesInterface::attributeValue(QAccessible::Attribute key) const
返回key 对象的属性值。
如果该属性已为该对象设置,则在QVariant 中返回给定键在QAccessible::Attribute 枚举文档中记录的类型值。
否则,将返回无效的QVariant 。
© 2025 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.