JM spaketh: > Hi all, > > What are the best practices to return from a common dialog window? > At the moment I have already solved with a Slot connected to the closure > of the dialog, > that invokes methods to retreive data. But what are the best practices? > What are the pros and cons of every solution? >
Yes, there are several ways to do this. IMHO it breaks out into two patterns: (a) Dialog operates on (references-to) *real* data, changes in the dialog cause immediate change on the system, the dialog can later be closed. (b) Dialog operates on a *copy* of the data-to-be edited, may have an "apply" button to "push" changes to the system, but "cancel" means all changes in the dialog are "un-done". For (b) (which is most of my dialogs), IMHO it's easiest to explicitly extract data from dialog-data-members after you confirmed the user "closed" and did not "cancel". So no, I don't ever "hook-up" slots-to-dialog-close operations as you did. --charley
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest