I am facing a problem in closing some objects in my app.
so I need to restart the application, or restart the main.
i found the below code on the internet, but it didn't work well. it's giving me the following error :
"no matching function for call to 'MainWindow::MainWindow(QPointer<QApplication>&)'
the code is :
and to restart it, from the main window, i think i should call exit(1000)#define RESTART_CODE 1000
int main(int argc, char *argv)
if(app) delete app;
if(main_window) delete main_window;
app = new QApplication(argc, argv);
main_window = new MainWindow(app);
return_from_event_loop_code = app->exec();
Any idea about the error ??? or is there another way to restart my application from the mainwindow???