Skip to content

Instantly share code, notes, and snippets.

@alpham
Created August 24, 2013 09:36
Show Gist options
  • Save alpham/6327138 to your computer and use it in GitHub Desktop.
Save alpham/6327138 to your computer and use it in GitHub Desktop.
Signals and Slots introduction Ahmed Magdy https://www.facebook.com/QtFci
#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())); //here is the most important part.
button->show();
return app.exec();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment