1.1 Hello Qt 开始 简单

#include<QtGui/QApplication>
#include<QLabel>

Q_DECL_EXPORTintmain(intargc,char*argv[])
{
QApplicationapp(argc,argv);
//QLabel*label=newQLabel("HelloQt!");
//QLabel对像,QLabel是一个qt提供的小控件,显示一行文本

QLabel*label=newQLabel("<h2><i>Hello</i><fontcolor=red>Qt!</font></h2>");
label->show();
//显示QLabel
//returnapp->exec();
returnapp.exec();
}
原文地址:https://www.cnblogs.com/xiangxiaodong/p/2343326.html