摘要:
#include<QtGui/QApplication>#include<QPushButton>intmain(intargc,char*argv[]){QApplicationapp(argc,argv);QPushButton*button=newQPushButton("Quit");QObject::connect(button,SIGNAL(clicked()),&app,SLOT(quit()));button->show();app.exec();} 阅读全文
摘要:
#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!</f 阅读全文