编写代码实现调用槽函数退出的quit程序界面
发布时间:2022-09-01 11:40:13
发布人:syq
#include #include #include int main(int argc,char *argv[]) { QApplication app(argc,argv); QWidget *pWidget=new QWidget; QPushButton *button=new QPushButton("Quit",pWidget); QObject::connect(button,SIGNAL(clicked()),pWidget,SLOT(close())); pWidget->show(); return app.exec(); }