#include<QApplication>
#include<QPushButton>
int main(int argc,char *argv[])
{
QApplication app(argc,argv);
QPushButton *button=new QPushButton("Quit");
//将应用程序的槽函数和button的点击信号连接
QObject::connect(button,SIGNAL(clicked()),&app,SLOT(quit()));
button->show();
return app.exec();
}