From 699a86ef2e0ac916f4ec5700872425d471650def Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Mon, 1 Mar 2021 20:50:27 +0100 Subject: [PATCH] Windows: Attach to console --- src/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 38b1b4111..755ec4501 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -71,6 +71,11 @@ int main(int argc, char *argv[]) #endif #ifdef Q_OS_WINDOWS + if (AttachConsole(ATTACH_PARENT_PROCESS)) { + freopen("CONOUT$", "w", stdout); + freopen("CONOUT$", "w", stderr); + } + QApplication::setStyle(QStringLiteral("breeze")); auto font = app.font(); font.setPointSize(10);