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 可訪問性 頁麵。
要運行範例從 Qt Creator ,打開 歡迎 模式,然後選擇範例從 範例 。更多信息,拜訪 構建和運行範例 .
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, Text types inside the example also identify themselves:
Accessible.role: Accessible.StaticText Accessible.name: text
文件: