QMessageLogContext Class
QMessageLogContext 类提供有关日志信息的附加信息。更多
头文件: | #include <QMessageLogContext> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
qmake: | QT += core |
详细描述
该类提供有关qDebug(),qInfo(),qWarning(),qCritical() 或qFatal() 消息生成的源代码位置的信息。
注意: 默认情况下,该信息只记录在调试构建中。您可以通过定义QT_MESSAGELOGCONTEXT
或QT_NO_MESSAGELOGCONTEXT
来明确覆盖此信息。
另请参阅 QMessageLogger 、QtMessageHandler 和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.