1.2 连接信号和响应函数

#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();
}

  

posted @ 2012-02-08 22:54  简单--生活  阅读(216)  评论(0编辑  收藏  举报
简单--生活(CSDN)