【原创】<Debug> QT头文件
【Error】 No such file or directory
【Solution】
参考: http://blog.csdn.net/donglynn/article/details/21804505
1、pro文件里,QT += core gui 改为 QT += core gui widgets
2..h文件里,#include <QtGui/QApplication>改为#include <QApplication>
【Error】 'QMessageBox' has not been declared
【solution】
加入头文件 #include<QTGui>,QMessageBox类才可以用
【Error】'QtGui/QMainWindow': No such file or directory : Qt 5.1.1
参考:网易博客 http://shitou7630.blog.163.com/blog/static/3269953620159311350611/
【Solution】
在pro文件中添加 widgets
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
By adding this line in .pro file, Now you just no need to worry about Qt version and include file like <QtGui/QMainWindow> or <QtWidgets/QMainWindow>