QPropertyChangeHandler 类

template <typename Functor> class QPropertyChangeHandler

QPropertyChangeHandler 类控制更改回调的生命周期,安装在 QProperty . 更多...

头: #include <QPropertyChangeHandler>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core
继承: QPropertyObserver

详细描述

QPropertyChangeHandler<Functor> is created when registering a callback on a QProperty to listen to changes to the property's value, using QProperty::onValueChanged and QProperty::subscribe 。只要改变处理程序存活,仍然安装回调。

可以使用 move 语义在 C++ 作用域之间传输处理程序实例。