<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Terminal Output Of Application Outside of Creator]]></title><description><![CDATA[<p dir="auto">I wish to see output statements in a Windows 10 desktop GUI application in a terminal when running in a release and debug builds outside of creator. The output statements work perfectly fine within Qt Creator.</p>
<p dir="auto">I am running Qt 6.9.2 on MSVC2022 64bit with Cmake.</p>
<pre><code>#include "mainwindow.h"
#include &lt;QApplication&gt;
#include &lt;iostream&gt;
#include &lt;QProcess&gt;
#include &lt;QDir&gt;
#include &lt;QDebug&gt;
int main(int argc, char *argv[])
{
    std::cout &lt;&lt; "Standard output text" &lt;&lt; std::endl;
    std::cerr &lt;&lt; "Standard error text" &lt;&lt; std::endl;
    QTextStream out(stdout);
    out &lt;&lt; "Test Qtext";
    QApplication a(argc, argv);
    MainWindow w;
    w.show();
    return a.exec();
}

</code></pre>
<p dir="auto">I have tried running QProcess's that would run concurrently to the application without success. Also, I have tried the recommended "Run in Terminal" option with and without enabling the internal terminal of Creator and both ways fail to show outputs. When I uncheck the "Run in terminal" option, my output is the expected text below.</p>
<pre><code>Hello from standard output!
Hello error message.
Test Qtext
</code></pre>
<p dir="auto">Would anyone have experience with this or have a hunch?</p>
]]></description><link>https://forum.qt.io/topic/163455/terminal-output-of-application-outside-of-creator</link><generator>RSS for Node</generator><lastBuildDate>Thu, 07 May 2026 08:59:50 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/163455.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 08 Oct 2025 15:29:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Terminal Output Of Application Outside of Creator on Mon, 13 Oct 2025 13:50:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a> Thank you for your post. It turns out the AllocConsole() was the solution. It was a Windows problem I was unfamiliar with rather than QT.  Have a  great week!</p>
]]></description><link>https://forum.qt.io/post/832727</link><guid isPermaLink="true">https://forum.qt.io/post/832727</guid><dc:creator><![CDATA[daviddev]]></dc:creator><pubDate>Mon, 13 Oct 2025 13:50:43 GMT</pubDate></item><item><title><![CDATA[Reply to Terminal Output Of Application Outside of Creator on Thu, 09 Oct 2025 14:07:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/daviddev">@<bdi>daviddev</bdi></a><br />
You have a Windows "UI" program, i.e. linked as a "windows" rather than a "console" application.</p>
<p dir="auto">I think you will find: when a Windows UI application is launched, whether from a terminal or icon-shortcut, that <em>stdout</em> and <em>stderr</em> are attached to "nowhere", so anything written to them "disappears".  If it works from <code>FrontEnd.exe &gt; output.txt</code> that implies that the calling shell has redirected stdout to the file so it stays like that when it runs and you get output there.</p>
<p dir="auto">The stuff inside <strong>Creator</strong> with/without terminal is special code in <strong>Creator</strong> so that's different.</p>
<p dir="auto">I am not sure what exactly you want to achieve for what situation(s).  Logging to file sounds like a better option than stdout/err for a UI program anyway.  Under Windows you might also try downloading something like <strong>dbwin</strong>, <strong>dbwin32</strong> or whatever the modern replacement is and running that --- that displays any text sent via Win <code>OutputDebugString()</code>, it may also capture some other stuff I'm not sure.  Your program can also call Win32 <code>AllocConsole()</code> to allocate a visible console window (like a terminal) and that will have stdout/err attached, instead of your attempted "supporting QProcess".  Finally a UI program could create e.g. a permanently visible modeless dialog/window with, say, a <code>QPlainTextEdit</code> in it to which you send all your output messages for it to display.</p>
]]></description><link>https://forum.qt.io/post/832576</link><guid isPermaLink="true">https://forum.qt.io/post/832576</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Thu, 09 Oct 2025 14:07:23 GMT</pubDate></item><item><title><![CDATA[Reply to Terminal Output Of Application Outside of Creator on Thu, 09 Oct 2025 13:49:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> Thank you for replying. I have launched the application without any arguments from cmd and Windows Powershell not as an administrator without them displaying any output.</p>
<pre><code>//Example Launches Without Output From cmd
C:\Users\username\path&gt; FrontEnd.exe
C:\Users\username\path&gt; start FrontEnd.exe
C:\Users\username\path&gt; start /B FrontEnd.exe

</code></pre>
<p dir="auto">Logs do display text when I launch the applications and redirect their output to a log. Logging is not an acceptable solution with the messages I wish displayed in runtime unfortunately.</p>
<pre><code>//Launch With Redirected Output
C:\Users\username\path&gt;FrontEnd.exe &gt; output.txt
</code></pre>
<p dir="auto">When I simply click on the executable through file explorer, no terminal pops up and there is also no output. However, there is no supporting QProcess that would launch another terminal, so I expect that. In Qt creator, I get output when I run with and without the internal terminal.</p>
<p dir="auto">From this behavior, my hunch is that it is a really simple fix or something subtle. It seems the terminal either receives the output and does not display it either because it is not listening, I need to enable special permissions for a windows terminal in the program, or there is a blocker of some kind.</p>
<p dir="auto">Would you have any ideas?</p>
]]></description><link>https://forum.qt.io/post/832574</link><guid isPermaLink="true">https://forum.qt.io/post/832574</guid><dc:creator><![CDATA[daviddev]]></dc:creator><pubDate>Thu, 09 Oct 2025 13:49:28 GMT</pubDate></item><item><title><![CDATA[Reply to Terminal Output Of Application Outside of Creator on Thu, 09 Oct 2025 05:24:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/daviddev">@<bdi>daviddev</bdi></a> Do you start your application from a terminal?</p>
]]></description><link>https://forum.qt.io/post/832546</link><guid isPermaLink="true">https://forum.qt.io/post/832546</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Thu, 09 Oct 2025 05:24:35 GMT</pubDate></item></channel></rss>