<QT Enterprise Latest edition Download >
In the Specify build settings (ii) Article, we show you how to build a step, add a custom build step, and clean up steps. In this article, we will continue to introduce you to the building environment, batch editing, and cleaning up the system environment.
Build Your Environment
In the Build Environment section, you can specify the build environment you want to use. By default, the QT creator environment uses and modifies the QT version contained therein. QT Creator automatically sets the necessary environment variables, depending on the QT version you choose. You can edit existing environment variables to add, reset, or not set new variables according to your project needs.
Note: change the specific. pro.user files that are stored in the local project because they are not suitable for sharing between developers and for PC-side development. To share your settings, you can incorporate them into your build system. For example, if you use Qmake, you can change the. Pro file.
Bulk Edit
To modify the environment variable values for the build or run environment, you can select batch Edit in the build or run settings, and then enter the environment variables in the Edit Environment dialog box. To remove a variable value from an environment variable, you can enter this variable name. For example, when the project builds or runs, test sets the value of the test variable to null.
To add a variable value to the environment, you can enter the name and value of the variable, and then separate it by the equals sign. For example, add/opt/bin to an existing path in the following line.
Path=/opt/bin:${path}
To add or remove several variables, you can place them in a separate row. Their order is very important, and if you delete a value in a row, you cannot reference it in the following line, but you can delete the value in the row where it was previously referenced.
Clean up the system environment
To build a clean system environment, you can select the Clear system Environment check box. Qt Creator will discard the current environment and then populate the compiler and the required tools into a clean system environment with environment variables. So even if you clear it, the environment variable will never be completely empty.
interested friends can click to see more articles about QT !
QT usage Tutorial specifying build settings (iii)