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 ().