This example demonstrates the implementation of accessible buttons.
可访问性 demonstrates QML types that are augmented with meta-data for accessibility systems. For more information, visit the Accessibility page.
要运行范例从 Qt Creator ,打开 欢迎 模式,然后选择范例从 范例 . For more information, visit Building and Running an Example.
The button identifies itself and its functionality to the accessibility system:
Accessible.name: text Accessible.description: "This button does " + text Accessible.role: Accessible.Button Accessible.onPressAction: { button.clicked() }Similarly, 文本 types inside the example also identify themselves:
Accessible.role: Accessible.StaticText Accessible.name: text