diff --git a/src/main.cpp b/src/main.cpp index 5482d44..a42749e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -14,6 +14,10 @@ #include +#if defined(Q_OS_WIN) +#include +#endif + #if defined(Q_OS_LINUX) && defined(STATIC) Q_IMPORT_PLUGIN(QXcbIntegrationPlugin) #endif @@ -32,6 +36,13 @@ int main(int argc, char *argv[]) Q_INIT_RESOURCE(assets_mining); #endif +#ifdef _WIN32 +if (AttachConsole(ATTACH_PARENT_PROCESS)) { + freopen("CONOUT$", "w", stdout); + freopen("CONOUT$", "w", stderr); +} +#endif + QStringList argv_; for(int i = 0; i != argc; i++){ argv_ << QString::fromStdString(argv[i]);