以下的代码,开头的前三行代码都报错,而且报错信息同样:
QApplication file not foundcode
#include<QApplication> #include<QDialog> #include<QLabel> int main(int argc,char *argv[]) { QApplication a(argc,argv); QDialog w; QLabel label(&w); label.setText("Hello World!你好 Qt!"); w.show(); return a.exec(); }
头文件改为:get
#include<QtWidgets/QApplication> #include<QtWidgets/QDialog> #include<QtWidgets/QLabel>