Qt Quick 例 - アクセシビリティ
この例では、アクセシブルなボタンの実装を示します。
アクセシビリティは、アクセシビリティ・システム用のメタデータで拡張されたQML型を示します。詳しくはアクセシビリティのページをご覧ください。
例の実行
からサンプルを実行するには Qt Creatorからサンプルを実行するには、Welcome モードを開き、Examples からサンプルを選択してください。詳しくは、例の作成と実行をご覧ください。
アクセシブルボタンの実装
ボタンは、それ自身とその機能をアクセシビリティ・システムに識別させます:
Accessible.name: text Accessible.description: "This button does " + text Accessible.role: Accessible.Button Accessible.onPressAction: { button.clicked() }
同様に、サンプル内のText 型も自分自身を識別します:
Accessible.role: Accessible.StaticText Accessible.name: text
© 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.