Fix:#183 "Display logging output in a console and able to show and hide"

This commit is contained in:
baydam
2016-01-21 21:54:34 +00:00
parent efe5c8f02a
commit 156e74acd5
9 changed files with 246 additions and 13 deletions
+9
View File
@@ -42,8 +42,17 @@ public:
}
};
// Intercept all logging message and display it in the console
void logMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg)
{
ConsoleWindow::getInstance()->messageLog(type, context, msg);
}
int main(int argc, char *argv[])
{
// Install message handler
qInstallMessageHandler(logMessageHandler);
set_env_vars_if_needed();
MainApplication app(argc, argv);