<?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[Qt Creator and environment variables on Windows]]></title><description><![CDATA[<p dir="auto">This concerns runtime environment.</p>
<p dir="auto"><strong>Question:</strong> I know how to set environment variables in Qt Creator "Preferences".  But does Qt Creator set any runtime environment variables of its own when an application is started in Qt Creator, as opposed to a deployed environment without Qt Creator?</p>
<p dir="auto">It would be nice if I could just query an existing variable instead of having to set it myself. That way, other developers would not have to remember to do this when they are maintaining my application.</p>
]]></description><link>https://forum.qt.io/topic/164396/qt-creator-and-environment-variables-on-windows</link><generator>RSS for Node</generator><lastBuildDate>Mon, 20 Apr 2026 01:00:03 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/164396.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 07 Mar 2026 21:51:40 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Qt Creator and environment variables on Windows on Sun, 08 Mar 2026 10:41:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/axel-spoerl">@<bdi>Axel-Spoerl</bdi></a><br />
Hi Axel.  OP wrote:</p>
<blockquote>
<p dir="auto">It would be nice if I could just query an existing variable instead of having to set it myself. That way, other developers would not have to remember to do this when they are maintaining my application.</p>
</blockquote>
<p dir="auto">So for his purposes he does not want (other) people to have to set an environment variable explicitly or by wrapping this in a <code>.bat</code> file or similar, presumably.</p>
<p dir="auto">The more I read the question as phrased the more it seems to be the same as his linked previous question.  I think we need to know just what he wants to answer best.</p>
]]></description><link>https://forum.qt.io/post/836951</link><guid isPermaLink="true">https://forum.qt.io/post/836951</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Sun, 08 Mar 2026 10:41:27 GMT</pubDate></item><item><title><![CDATA[Reply to Qt Creator and environment variables on Windows on Sun, 08 Mar 2026 10:35:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a> said in <a href="/post/836948">Qt Creator and environment variables on Windows</a>:</p>
<blockquote>
<p dir="auto">an environment variable auto-set by Creator</p>
</blockquote>
<p dir="auto">Just write a launcher script that sets a variable before starting Creator.</p>
<pre><code>@echo off
set LAUNCHED_BY_QT_CREATOR=1
start "" "C:\Qt\Tools\QtCreator\bin\qtcreator.exe"
pause
</code></pre>
]]></description><link>https://forum.qt.io/post/836950</link><guid isPermaLink="true">https://forum.qt.io/post/836950</guid><dc:creator><![CDATA[Axel Spoerl]]></dc:creator><pubDate>Sun, 08 Mar 2026 10:35:55 GMT</pubDate></item><item><title><![CDATA[Reply to Qt Creator and environment variables on Windows on Sun, 08 Mar 2026 09:54:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robert-hairgrove">@<bdi>Robert-Hairgrove</bdi></a> said in <a href="/post/836940">Qt Creator and environment variables on Windows</a>:</p>
<blockquote>
<p dir="auto">But does Qt Creator set any runtime environment variables of its own when an application is started in Qt Creator, as opposed to a deployed environment without Qt Creator?</p>
</blockquote>
<p dir="auto">All as <a class="plugin-mentions-user plugin-mentions-a" href="/user/axel-spoerl">@<bdi>Axel-Spoerl</bdi></a> has written, you can set your own from <strong>Creator</strong>.  But are you asking specifically whether there is an environment variable auto-set by Creator when running from Creator, which you could test in your code if you want to know this?  Because that was asked recently-ish and IIRC there is such a variable.  Is that what you want, do you want me to go see if I can dig out the thread?</p>
<p dir="auto">...OK, I couldn't resist, so I did a search.  Surprise, surprise, it was your question!  <a href="https://forum.qt.io/topic/163919/how-to-determine-at-runtime-whether-app-is-running-launched-by-qt-creator">How to determine at runtime whether app is running launched by Qt Creator?</a>.  We talked about environment variables <code>QTC_RUN</code> or <code>_QTC_Path</code>.  Your question sounds to me like you are asking about this again, or is the angle here rather different?</p>
]]></description><link>https://forum.qt.io/post/836948</link><guid isPermaLink="true">https://forum.qt.io/post/836948</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Sun, 08 Mar 2026 09:54:15 GMT</pubDate></item><item><title><![CDATA[Reply to Qt Creator and environment variables on Windows on Sun, 08 Mar 2026 09:18:03 GMT]]></title><description><![CDATA[<p dir="auto">Hi Robert,</p>
<p dir="auto">Qt Creator sets environment variables on project level, not globally.<br />
You can set a different environment for building and running.<br />
Go project configuration, chose build or run settings and specify additional variables in the "Environment" section.<br />
Check the <a href="https://doc.qt.io/qtcreator/creator-how-set-project-environment.html" target="_blank" rel="noopener noreferrer nofollow ugc">documentation</a> for more information.</p>
<p dir="auto">Cheers<br />
Axel</p>
]]></description><link>https://forum.qt.io/post/836946</link><guid isPermaLink="true">https://forum.qt.io/post/836946</guid><dc:creator><![CDATA[Axel Spoerl]]></dc:creator><pubDate>Sun, 08 Mar 2026 09:18:03 GMT</pubDate></item></channel></rss>