I'm writing a dialog and when the user is clicking ok in the dialog, the dialog should send all the data that has been entered back to the mainwindow. As I see it I have two options.
When creating the dialog, send a pointer to the mainwindow and call a function parent->doStuff(...config data...);

or do this with signals and slots, but that seems a little overkill, calling connect and disconnect(?) to release the signals/slots.

Are there more options for doing this?
Any way that is considered to be the "best"?