#include "mainwindow.h"
#include <QApplication>
#include <QPushButton>
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MainWindow w;
    QPushButton b("helloworld");//创建按键对象,并设置他的显示文本为“helloworld”
    b.show(); //显示按键,控件被创建时默认是不显示的
    QObject::connect(&b,SIGNAL(clicked()),&a,SLOT(quit())); //信号与槽机制,点击之后退出窗口
    
    return a.exec();//进入消息循环等待可能输入进行响应
}










