QScopedPropertyUpdateGroup Class

RAII-Klasse um Qt::beginPropertyUpdateGroup()/Qt::endPropertyUpdateGroup(). Mehr...

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

Öffentliche Funktionen

Detaillierte Beschreibung

Diese Klasse ruft Qt::beginPropertyUpdateGroup() in ihrem Konstruktor und Qt::endPropertyUpdateGroup() in ihrem Destruktor auf. Damit wird sichergestellt, dass die letztgenannte Funktion auch bei vorzeitigen Rückgaben oder ausgelösten Exceptions zuverlässig aufgerufen wird.

Hinweis: Qt::endPropertyUpdateGroup() kann Ausnahmen, die durch Bindungsbewertungen ausgelöst wurden, erneut auslösen. Das bedeutet, dass Ihre Anwendung abstürzen kann (std::terminate() wird aufgerufen), wenn eine andere Ausnahme dazu führt, dass der Destruktor von QScopedPropertyUpdateGroup während des Stack Unwinding aufgerufen wird. Wenn Sie Ausnahmen von Bindungsauswertungen erwarten, verwenden Sie manuelle Qt::endPropertyUpdateGroup() Aufrufe und try/catch Blöcke.

Siehe auch QProperty.

Dokumentation der Mitgliedsfunktionen

QScopedPropertyUpdateGroup::QScopedPropertyUpdateGroup()

Ruft Qt::beginPropertyUpdateGroup() auf.

QScopedPropertyUpdateGroup::~QScopedPropertyUpdateGroup()

Ruft Qt::endPropertyUpdateGroup() auf.

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