Qt Quick Exemplos - Acessibilidade
Este exemplo demonstra a implementação de botões acessíveis.
A acessibilidade apresenta tipos QML que são complementados com metadados para sistemas de acessibilidade. Para mais informações, acesse a página Acessibilidade.
Executando o exemplo
Você pode executar o exemplo a partir de:
- Qt Creator
Abra o modo “ Welcome ” e selecione o exemplo em Examples. Para mais informações, consulte Qt Creator: Tutorial: Compilar e executar.
- Qt Extension for Visual Studio Code
Execute o comando ` Qt: Open Qt examples ` a partir de ` Command Palette` e selecione o exemplo na lista. Para obter mais informações, consulte Qt Extension for Visual Studio Code: Tutorial: Compilar e executar.
Implementação de botões acessíveis
O botão identifica a si mesmo e sua funcionalidade para o sistema de acessibilidade:
Accessible.name: text
Accessible.description: "This button does " + text
Accessible.role: Accessible.Button
Accessible.onPressAction: {
button.clicked()
}Da mesma forma, os tipos ` Text ` dentro do exemplo também se identificam:
Accessible.role: Accessible.StaticText
Accessible.name: text© 2026 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.