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

パブリック関数

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 の値を返します。

このオブジェクトに属性が設定されている場合、QAccessible::Attribute 列挙のドキュメントで指定されたキーに対してドキュメント化された型の値が、QVariant に返されます。

そうでない場合は、無効な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.