Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <QApplication>
- #include <QPushButton> //Allow PushButtons.
- int main(int argc, char *argv[])
- {
- QApplication prog(argc, argv);
- QPushButton *button = new QPushButton("Quit"); //Declare.
- button->show(); //Display.
- QObject::connect(button, SIGNAL(clicked()), &prog, SLOT(quit()));
- //SIGNAL() = the event that the user does.
- //SLOT() = the code that gets executed after the event.
- return prog.exec();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement