#include "logindialog.h"class ModuleManager : public QObject{ Q_OBJECT LoginDialog * privateDialog; ... public slots: void temp();};ModuleManager::ModuleManager():QObject(){ ... privateDialog = new LoginDialog; if (connect(privateDialog, SIGNAL(accepted()), this, SLOT(temp()))) { ... }}
privateDialog = new LoginDialog; if (connect(privateDialog, SIGNAL(accepted()), this, SLOT(temp()))) { ... } privateDialog->show();
int main (int argc, char **argv){ QApplication app(argc, argv); if (argc > 1) { ModuleManager moduleManager(argv[1]); } return app.exec();}