Step 3: Set the Environment Variables We recommend creating a desktop link that opens a command prompt with the environment set up similar to the Command Prompt menu entries provided by Visual Studio. This is done by creating an application link passing a .cmd file setting up the environment and the command line option /k (remain open) to cmd.exe.
Assuming the file is called qt6vars.cmd and the Qt folder is called C:\Qt\6.3.0\Src:
REM Set up Microsoft Visual Studio 2019, where <arch> is amd64, x86, etc. CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsall.bat" <arch> SET _ROOT=C:\Qt\6.3.0\Src SET PATH=%_ROOT%\qtbase\bin;%PATH% SET _ROOT= A desktop link can then be created by specifying the command %SystemRoot%\system32\cmd.exe /E:ON /V:ON /k C:\Qt\qt6vars.cmd as application.
Depending on your individual setup, you might also need to make the installation directories of CMake, Ninja, Perl, and Python part of the SET %PATH% line above.