[Qt-creator] Set build environment variable from Qt Creator variable
Christian Kandeler
christian.kandeler at qt.io
Wed Feb 25 10:46:34 CET 2026
On 2/24/26 6:51 PM, Andrzej Telszewski wrote:
> On 10/02/2026 10:49, Christian Kandeler via Qt-creator wrote:
>> On 2/10/26 10:19 AM, Andrzej Telszewski wrote:
>>> how can I use QtC's variables expansion to set an environment
>>> variable (e.g. in build environment)?
>> There is currently no support for macro expansion in most environment
>> widgets.
>> Feel free to file a feature request at bugreports.qt.io.
>>
>
> Did the first step and registered to the bugreports ;)
>
> Anyways, I'll still want to ask: is there _any_ way to set build
> environment variable,
> that could somehow contain project's root directory - not hardcoded,
> but derived?
>
> My use case is for *.shared project files.
> When creating such shared project file, I use the likes of macro
> expansion,
> so that the shared file does not contain any hardcoded paths, and works
> no matter in which location I checkout my source code.
I don't think so. However: Isn't this something you should rather do in
your project file? Surely your build system provides you with the
project directory and allows you to set environment variables?
Christian
More information about the Qt-creator
mailing list