QPropertyNotifier Class
QPropertyNotifier 类可控制安装在QProperty 上的更改回调的生命周期。
头文件: | #include <QPropertyNotifier> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
qmake: | QT += core |
继承于 | QPropertyObserver |
详细描述
QPropertyNotifier 是在QProperty 上注册回调以监听属性值变化时创建的,使用QProperty::addNotifier 。只要变化处理程序还活着,回调就会一直安装。
处理程序实例可使用移动语义在 C++ 作用域之间传输。
© 2025 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.