In questa pagina

QPropertyChangeHandler Class

template <typename Functor> class QPropertyChangeHandler

La classe `QPropertyChangeHandler` gestisce il ciclo di vita delle callback di modifica installate su un oggetto ` QProperty`. Maggiori informazioni...

Intestazione: #include <QPropertyChangeHandler>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core
Eredita da: QPropertyObserver

Descrizione dettagliata

QPropertyChangeHandler è una classe template in cui il parametro template Functor specifica il tipo della funzione di callback che viene invocata quando il valore della proprietà cambia.

QPropertyChangeHandler<Functor> viene creato quando si registra una callback su un QProperty per monitorare le modifiche al valore della proprietà, utilizzando QProperty::onValueChanged e QProperty::subscribe. Finché il gestore delle modifiche è attivo, la callback rimane installata.

Un'istanza del gestore può essere trasferita tra ambiti C++ utilizzando la semantica di spostamento.

© 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.