QMessageLogContext Class

Die Klasse QMessageLogContext liefert zusätzliche Informationen über eine Protokollmeldung. Mehr...

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

Detaillierte Beschreibung

Die Klasse liefert Informationen über den Ort des Quellcodes, an dem eine qDebug(), qInfo(), qWarning(), qCritical() oder qFatal() Nachricht erzeugt wurde.

Hinweis: Standardmäßig wird diese Information nur in Debug-Builds aufgezeichnet. Sie können dies explizit überschreiben, indem Sie QT_MESSAGELOGCONTEXT oder QT_NO_MESSAGELOGCONTEXT definieren.

Siehe auch QMessageLogger, QtMessageHandler, und qInstallMessageHandler().

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