QPropertyNotifier Class
QPropertyNotifier 类负责控制安装在QProperty 上的变更回调的生命周期。更多内容...
| 头文件: | #include <QPropertyNotifier> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
| qmake: | QT += core |
| 自: | Qt 6.2 |
| 继承自: | QPropertyObserver |
公共函数
详细说明
当通过 `QProperty::addNotifier` 在 `QProperty ` 上注册回调以监听属性值的变更时,会创建 `QPropertyNotifier`。只要变更处理程序仍处于活动状态,该回调就保持已安装状态。
处理程序实例可以使用移动语义在 C++ 作用域之间进行传递。
© 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.