QPropertyChangeHandler Class

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> は、QProperty::onValueChangedQProperty::subscribe を使用して、プロパティの値の変更をリッスンするコールバックをQProperty に登録するときに作成されます。変更ハンドラーが生きている限り、コールバックはインストールされたままです。

ハンドラのインスタンスは、移動セマンティクスを使用して、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.