Qt Include 和 QMake 错误
Qt 在 Windows 上搞砸了,所以我删除了它并使用 qt 库和 Qt Creator 重新安装了它。现在,每当我尝试打开旧项目时,都会收到“Qmake 不存在或不可执行”的错误,并且无法找到任何 Qt 标头。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设您使用的是 Qt 的最新版本(例如版本 4.7.4)和 Qt Creator 的最新版本(例如分支 2.3.*)。
可能在此过程中的某个地方,Qt Creator 或该特定项目的设置丢失了对 Qt 安装的引用。
我们首先需要查明 Qt Creator 是否知道 Qt 安装在哪里。转到
工具>选项...
。然后点击Qt4。这里将显示所有已安装和检测到的 Qt 版本。如您所见,我安装了一个 Qt 版本 (4.7.4),它是自动检测到的。
如果您没有安装任何版本,则需要手动指定一个版本。只需单击
添加
并将其指向右侧的qmake.exe
。使用图中的路径作为参考。如果您正在开发 windows/mingw 应用程序,只需添加与 mingw 关联的 qmake.exe (c:\qtsdk\desktop\qt\4.7.4\mingw\bin\qmake .exe
在我的计算机上)并记住版本名称,我们在下一步中需要它。之后,打开项目并单击侧栏中的
Projects
。您需要替换 Qt 版本。单击旁边的管理
并选择正确的版本。这应该可以解决问题。有任何问题请评论。对不起,令人毛骨悚然的英语。
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.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 rightqmake.exe
. Use the paths of the figure as reference. If you are developing a windows/mingw application, just need to add theqmake.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 onManage
next to it and select the correct version. This should resolve the problem.Any trouble just comment. Sorry about the creepy english.