This took me ages to fix but in the end I fixed this problem by:
Example Batch Script:
Here’s how you can create a batch script to clear the PATH and run the Qt installer:
Open Notepad.
Copy and paste the following lines into Notepad:
batch
Copy code
@echo off
rem Clear the PATH environment variable
set PATH=
rem Run Qt installer
"InstallerPath/...."
Save the file with a .bat extension, for example, install_qt.bat.
Run the batch script by double-clicking it. This will open a Command Prompt window, clear the PATH, and then run the Qt installer.
Note:
Replace "InstallerPath/...." with the correct path to your Qt installer.
Ensure that the Qt installer file you're using is not corrupted and that you have downloaded it completely.