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