[SOLVED] Run Function on Dialog Close
-
The dialog window provides access to database, so when I close the dialog, I want my combobox to be updated with the updated information. I have been looking for way too long and have found answers that strayed from what I either understood or what my goal was, and the search function is terrible for trying to find specifics.
How can I, in some way, have my combobox query the db when the dialog box is closed? (Only need to know how to get the close event to my main window, and then I can run my update function when the close event returns true)
-
How do you show the dialog?
Normally you could do something like this:
@MyDialog *myDialog = new MyDialog(this);
myDialog->exec(); //blocks until dialog is done with!
doSomethingAfterDialog();@Other than that, you can of course re-implement the closeEvent() of your dialog class and then do whatever is needed there. Lats but not least, you could connect to the dialog's accepted() or finished() signal.
-
Thank you so much! I never even realized that anything below the execution was blocked, I was thinking far too into it and looked over the simple things :D