Nesta página

QAccessibleStateChangeEvent Class

O evento `QAccessibleStateChangeEvent` notifica a estrutura de acessibilidade de que o estado de um objeto foi alterado. Mais...

Cabeçalho: #include <QAccessibleStateChangeEvent>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
Herdado de: QAccessibleEvent

Funções públicas

QAccessibleStateChangeEvent(QAccessibleInterface *iface, QAccessible::State state)
QAccessibleStateChangeEvent(QObject *object, QAccessible::State state)
QAccessible::State changedStates() const

Descrição detalhada

Esta classe é usada com ` QAccessible::updateAccessibility()`.

Veja também ` QAccessibleInterface::state()`.

Documentação das funções de membro

QAccessibleStateChangeEvent::QAccessibleStateChangeEvent(QAccessibleInterface *iface, QAccessible::State state)

Cria um novo objeto `QAccessibleStateChangeEvent`. ` iface ` é a interface associada ao evento e ` state ` é o estado do objeto acessível.

QAccessibleStateChangeEvent::QAccessibleStateChangeEvent(QObject *object, QAccessible::State state)

Cria um novo objeto `QAccessibleStateChangeEvent` para ` object`. A diferença em relação ao estado anterior do objeto está em ` state`.

QAccessible::State QAccessibleStateChangeEvent::changedStates() const

Retorna os estados que sofreram alterações.

Lembre-se de que os estados retornados são aqueles que foram alterados. Para saber o estado de um objeto, use ` QAccessibleInterface::state()`.

Por exemplo, se um objeto tinha o foco, mas o perdeu, o estado do objeto terá “focused” definido como “ false ”. Esse evento, por outro lado, informa sobre a alteração e tem “focused” definido como “ true ”, já que o estado do foco mudou de “ true ” para “ false ”.

© 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.