Batch edit environment settings

You can change the environment variable values for build or run environments either for a particular project or globally for all projects in the Edit Environment dialog:

{Edit Environment dialog}

Use the following syntax to enter environment variable names and values: <VARIABLE>=<VALUE>.

To remove a variable value from the environment, enter the variable name. For example, TEST sets the value of the TEST variable empty when building or running the project.

To add a variable value to the environment, enter the variable name and value, separated by the equals sign. For example, the following line prepends the /opt/bin folder to the existing PATH:

  • On Windows: PATH=C:\opt\bin;${PATH}
  • On Linux: PATH=/opt/bin:${PATH}

To add or remove several variables, place them on separate lines. The order is important. If you remove a value on a line, you cannot refer to it on the following lines. However, you can remove a value after you have referred to it on an earlier line.

To temporarily disable a variable, add a hash character (#) to the beginning of the line.

See also Specify the environment for projects, Configure projects for building, Configure projects for running, and Use Qt Creator variables.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.