Skip to content

Instantly share code, notes, and snippets.

@kangjianbin
Created November 6, 2015 10:58
Show Gist options
  • Save kangjianbin/743a5b350d0c1f259656 to your computer and use it in GitHub Desktop.
Save kangjianbin/743a5b350d0c1f259656 to your computer and use it in GitHub Desktop.
#include <QApplication>
#include <QtWidgets>
#include "TDialog.hpp"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QPushButton w;
TDialog d(&w);
w.show();
QObject::connect(&w, &QPushButton::clicked, [&d]() {
d.exec();
});
return a.exec();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment