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();
}
posted @ 2012-02-08 22:45  简单--生活  阅读(254)  评论(0编辑  收藏  举报
简单--生活(CSDN)