Qt Include and QMake error

2019-07-28 18:13发布

Qt was messing up on Windows so I deleted it and re installed it with the qt libraries and Qt Creator. Now, whenever I try to open my old project, I get the error that "Qmake is does not exist or is not executable", and none of the Qt headers can be located.

标签: qt qt-creator
1条回答
聊天终结者
2楼-- · 2019-07-28 19:01

Assuming you're using a recent version of Qt, such as version 4.7.4, and a recent version of Qt Creator, such as the branch 2.3 .*.

Probably somewhere in this process, Qt Creator or the settings for this specific project lost the reference to Qt install.

We first need to find out if Qt Creator knows where Qt is installed. Go to Tools > Options.... Then click in Qt4. Here will show all installed and detected Qt versions.

Detected Qt versions

As you can see, I have one Qt version installed (4.7.4), which was automatically detected.

If you do not have any installed version, you need to indicate a one manually. Simply click Add and point it to the right qmake.exe. Use the paths of the figure as reference. If you are developing a windows/mingw application, just need to add the qmake.exe associated with mingw (c:\qtsdk\desktop\qt\4.7.4\mingw\bin\qmake.exe on my computer) and remember the Version name, we'll need that in next step.

After that, open the project and click on Projects in the lateral bar. You need to Substitute the Qt version. Click on Manage next to it and select the correct version. This should resolve the problem.

Changing the project's Qt version

Any trouble just comment. Sorry about the creepy english.

查看更多
登录 后发表回答