In QT5, when I use this: #include<QApplication>, QT tells :no such file or directory, even though it is all right for previous version of QT. It turns out these files QApplication and so on have been moved to other places. How to correct? #include &
尝试用Qt5编译Qt4的工程.你会遇到下面的问题: 错误:C1083: 无法打开包括文件:“QApplication”: No such file or directory 出现原因:Qt5里不再用QtGui模块,而是使用QtWidgets模块.解决方法: 在.pro里加上QT += widgets 然后把所有的 再编译如果还出现这样那样的错误,也很正常,因为我遇见了意大堆.最后总结: 不要想着安了Qt5,就直接用他来继续之前Qt4写的工程,不如还是用Qt4吧,有新工程从头开始可以使用Qt5.虽