QScopedPropertyUpdateGroup Class

RAII class around Qt::beginPropertyUpdateGroup ()/ Qt::endPropertyUpdateGroup (). 更多...

頭: #include <QScopedPropertyUpdateGroup>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core
Since: Qt 6.6

公共函數

QScopedPropertyUpdateGroup ()
~QScopedPropertyUpdateGroup ()

詳細描述

This class calls Qt::beginPropertyUpdateGroup () in its constructor and Qt::endPropertyUpdateGroup () in its destructor, making sure the latter function is reliably called even in the presence of early returns or thrown exceptions.

注意: Qt::endPropertyUpdateGroup () may re-throw exceptions thrown by binding evaluations. This means your application may crash ( std::terminate() called) if another exception is causing QScopedPropertyUpdateGroup's destructor to be called during stack unwinding. If you expect exceptions from binding evaluations, use manual Qt::endPropertyUpdateGroup () calls and try / catch blocks.

另請參閱 QProperty .

成員函數文檔編製

QScopedPropertyUpdateGroup:: QScopedPropertyUpdateGroup ()

調用 Qt::beginPropertyUpdateGroup ().

QScopedPropertyUpdateGroup:: ~QScopedPropertyUpdateGroup ()

調用 Qt::endPropertyUpdateGroup ().