Doc: Minor QDialog clarification

Minor rewrite of a bit that caused some confusion.

Fixes: QTBUG-73335
Change-Id: Ic1df44e62a29035c7b93052204fbe9ef72db5f40
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
Paul Wicking 2019-01-29 13:36:02 +01:00
parent ab53f0f24e
commit 48405219fb

View File

@ -263,12 +263,11 @@ void QDialogPrivate::deletePlatformHelper()
The most common way to display a modal dialog is to call its
exec() function. When the user closes the dialog, exec() will
provide a useful \l{#return}{return value}. Typically,
to get the dialog to close and return the appropriate value, we
connect a default button, e.g. \uicontrol OK, to the accept() slot and a
\uicontrol Cancel button to the reject() slot.
Alternatively you can call the done() slot with \c Accepted or
\c Rejected.
provide a useful \l{#return}{return value}. To close the dialog
and return the appropriate value, you must connect a default button,
e.g. an \uicontrol OK button to the accept() slot and a
\uicontrol Cancel button to the reject() slot. Alternatively, you
can call the done() slot with \c Accepted or \c Rejected.
An alternative is to call setModal(true) or setWindowModality(),
then show(). Unlike exec(), show() returns control to the caller