|
1Qter豆
main 文件如下:
#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();
}
项目文件如下:
SOURCES += \QT += core gui widgets \ \\这里看网上文章因为5.2对比4.8的文件路径有所变化,需要增加这么一段, main.cpp出现错误
Makefile.Debug:132: error: recipe commences before first target. Stop.
头文件换成#include <QtWidgets/QApplication>
这些问题具体怎么解决呢?
|
最佳答案
查看完整内容
看下这里吧:http://www.qter.org/forum.php?mod=viewthread&tid=903
|