A couple of techniques that you can apply:
1. Use a settings class (singleton) or file (I prefer the file). In your dialog, for the Ok and Apply button, write the settings to the file (or set them in the settings class). When opening the dialog read the settings from the file or settings class and fill in the fields of your dialog.
2. Use signals and slots. Again, when clicking the Ok or Apply button in your dialog, emit a signal that sends the new data to anything that is connected to the signal. I do not prefer this as when the dialog is complex, there needs to be a monstrous amount of signals or one monster of a signal.
3. Return the data from the exec() function. But again, like in point 2, if there's a lot of data, this is not a fun technique.
Bookmarks