本帖最后由 SYTING 于 2018-2-6 14:11 编辑
我在学习Qt是遇到了问题,我在Qt Creator中创建了一个Empty qmake Project的HelloWworld的项目,项目如下:
HelloWorld.pro
greaterThan(QT_MAJOR_VERSION, 4):QT + = widgets
SOURCES += \
main.cpp
//添加main.cpp
main.cpp
#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();
}
我试图运行程序
可是编译运行按钮是灰色的
概要信息:
/home/syting/QTapp/02/2-2/HelloWorld/HelloWorld.pro(1):Assignment needs exactly one word on the left hand side.
环境:
CentOS-7.0-1406-x86_64
qt-opensource-linux-x64-5.9.3
|