Reputation: 2171
I want to execute a function after closing a child window , here is my code, this do not work as expected
Preferences *dialog = new Preferences();
connect(dialog,SIGNAL(destroyed()),this,SLOT(LoadSettings()));
dialog->show();
Edit: It seems that I mistakenly chose QmainWIndow for preference dialog :-( , can I fix this without porting it into Qdialog? Or is there any easy way to port Qmainwindow ui to Qdialog ui
Upvotes: 1
Views: 847
Reputation: 852
Preferences *dialog = new Preferences();
connect(dialog,SIGNAL(destroyed()),this,SLOT(LoadSettings()));
dialog->exec();
delete dialog;
Upvotes: 1