#include "mainwindow.h" #include #include "LogIn/LoginDialog.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); LoginDialog dlg; if (dlg.exec() ==QDialog::Accepted) { MainWindow w; w.move((a.desktop()->width() - w.width()) / 2, (a.desktop()->height() - w.height()) / 2); w.show(); return a.exec(); } else { return 0; } }