Qt HelloWorld 使用button显示

来源:互联网 发布:软件逻辑笔试题 编辑:程序博客网 时间:2024/05/18 19:19
#include <QApplication>
#include <QPushButton>

int main(int argc,char *argv[])
{
QApplication app(argc,argv);
QPushButton *button = new QPushButton("Quit");
QObject::connect(button,SIGNAL(clicked()),&app,SLOT(quit()));
button->show();
return app.exec();
}

0 0
原创粉丝点击