QDialog不是这样的文件或目录 – Qt Windows

我刚刚安装了基于Qt 5.0的Qt Creator 2.6.1.

我正在尝试打开4.8上的项目,但我无法编译它.它不断向我显示“不是这样的文件或目录”的错误.

error: C1083: Cannot open include file: 'QtGui/QApplication': No such file or directory 

error: C1083: Cannot open include file: 'QDialog': No such file or directory 

error: C1083: Cannot open include file: 'QMainWindow': No such file or directory 

error: C1083: Cannot open include file: 'QWidget': No such file or directory

还有很多.

我将qmake.exe路径添加到PATH …我还需要做其他事吗?

阅读从Qt4到Qt5的过渡指南. Link1 Link2 Link3

One of the major internal infrastructural changes in Qt 5 compared to
Qt 4 is the splitting of widgets from the QtGui module into a new
QtWidgets module. This obvIoUsly will require buildsystem changes at
least,but also causes the need for downstreams to add includes for
headers which were not needed before,as those includes were removed
from headers which Now remain in the QtGui module.

Another includes-related issue in porting from Qt 4 to Qt 5 is dealing
with includes for classes which have moved to the QtWidgets module.
Whereas Qt 4 based code might use

#include <QtGui/QWidget>
This must be updated to either

#include <QtWidgets/QWidget>
Or more portably (Which works in Qt 4 and Qt 5):

#include <QWidget>

相关文章

Windows2012R2备用域控搭建 前置操作 域控主域控的主dns:自...
主域控角色迁移和夺取(转载) 转载自:http://yupeizhi.blo...
Windows2012R2 NTP时间同步 Windows2012R2里没有了internet时...
Windows注册表操作基础代码 Windows下对注册表进行操作使用的...
黑客常用WinAPI函数整理之前的博客写了很多关于Windows编程的...
一个简单的Windows Socket可复用框架说起网络编程,无非是建...