QAccessibleStateChangeEvent Class
QAccessibleStateChangeEvent 用于通知辅助功能框架某个对象的状态已发生变化。更多内容...
| 标题: | #include <QAccessibleStateChangeEvent> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
| qmake: | QT += gui |
| 继承自: | QAccessibleEvent |
- 所有成员列表(包括继承的成员)
- QAccessibleStateChangeEvent 属于辅助功能类。
公共函数
| QAccessibleStateChangeEvent(QAccessibleInterface *iface, QAccessible::State state) | |
| QAccessibleStateChangeEvent(QObject *object, QAccessible::State state) | |
| QAccessible::State | changedStates() const |
详细描述
该类与QAccessible::updateAccessibility() 配合使用。
另请参阅 QAccessibleInterface::state()。
成员函数文档
QAccessibleStateChangeEvent::QAccessibleStateChangeEvent(QAccessibleInterface *iface, QAccessible::State state)
创建一个新的 QAccessibleStateChangeEvent。iface 是与该事件关联的接口,state 是可访问对象的状态。
QAccessibleStateChangeEvent::QAccessibleStateChangeEvent(QObject *object, QAccessible::State state)
为object 创建一个新的QAccessibleStateChangeEvent。该对象与先前状态的差异存储在state 中。
QAccessible::State QAccessibleStateChangeEvent::changedStates() const
返回已发生变化的状态。
请注意,返回的是已发生变化的状态。若要了解对象的状态,请使用QAccessibleInterface::state()。
例如,如果某个对象原本拥有焦点但随后失去了焦点,该对象的状态中`focused`字段将设置为false 。而此事件则反映了状态的变化,其`focused`字段将设置为true ,因为焦点状态已从true 变为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.