QPropertyChangeHandler Class
template <typename Functor> class QPropertyChangeHandlerQPropertyChangeHandler クラスは、QProperty に登録された変更コールバックのライフサイクルを制御します。詳細...
| ヘッダー: | #include <QPropertyChangeHandler> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
| qmake: | QT += core |
| 継承元: | QPropertyObserver |
詳細な説明
QPropertyChangeHandler は、テンプレートパラメータFunctor によって、プロパティの値が変更された際に呼び出されるコールバック関数の型を指定するテンプレートクラスです。
QPropertyChangeHandler<Functor>は、QProperty::onValueChanged およびQProperty::subscribe を使用して、QProperty に対してコールバックを登録し、プロパティの値の変更を監視する際に生成されます。変更ハンドラが存続している限り、コールバックはインストールされたままとなります。
ハンドラインスタンスは、移動セマンティクスを使用して 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.