The QMessageLogContext class provides additional information about a log message. 更多...
头: | #include <QMessageLogContext> |
qmake: | QT += core |
Since: | Qt 5.0 |
const char * | category |
const char * | file |
const char * | function |
int | line |
int | version |
The QMessageLogContext class provides additional information about a log message.
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 ().