QMessageLogContext Class

The QMessageLogContext class provides additional information about a log message. 更多...

头: #include <QMessageLogContext>
qmake: QT += core
Since: Qt 5.0

该类在 Qt 5.0 引入。

    详细描述

    The class provides information about the source code location a qDebug (), qInfo (), qWarning (), qCritical () 或 qFatal () message was generated.

    注意: By default, this information is recorded only in debug builds. You can overwrite this explicitly by defining QT_MESSAGELOGCONTEXT or QT_NO_MESSAGELOGCONTEXT .

    另请参阅 QMessageLogger , QtMessageHandler ,和 qInstallMessageHandler ().