[Interest] Best Practices returning data from a dialog

Alex Malyushytskyy alexmalvtk at gmail.com
Thu Aug 23 02:24:35 CEST 2012


It depends on functionality you need and type of your dialog (modal/modeless)
In any case I do not think appropriate time is when dialog is closed.

Check QDialog documentation for example at:
http://doc.qt.nokia.com/4.7-snapshot/qdialog.html

In general for modal dialog you might want to update data when
as reaction on 	accepted () signal or when exec returns
with QDialog::Accepted

For modeless dialogs (in general) you might update data as soon it is
changed in the dialog or button Ok/ Apply clicked (again depends on
the design).
Common sense is the best practice.

Regards,
    Alex

On Wed, Aug 22, 2012 at 3:15 PM, JM <johnmiller at email.it> wrote:
> 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?
>
> TIA,
> JM
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest



More information about the Interest mailing list