报错如下:

E:\project\QTProject\HelloWord>qmake
Project ERROR: Cannot run compiler 'cl'. Output:
===================
===================
Maybe you forgot to setup the environment?

E:\project\QTProject\HelloWord>

通过​​everything​​​软件,找到​​cl.exe​​文件的所在位置:

解决QT问题:运行qmake:Project ERROR: Cannot run compiler ‘cl‘. Output:_QT

此文件在我的电脑上的位置:

解决QT问题:运行qmake:Project ERROR: Cannot run compiler ‘cl‘. Output:_QT_02

把这个​​cl.exe​​所在电脑的地址添加到环境变量中:

解决QT问题:运行qmake:Project ERROR: Cannot run compiler ‘cl‘. Output:_qmake_03

再次执行:

解决QT问题:运行qmake:Project ERROR: Cannot run compiler ‘cl‘. Output:_qmake_04