summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Wicking <paul.wicking@qt.io>2019-01-29 13:36:02 +0100
committerPaul Wicking <paul.wicking@qt.io>2019-03-04 12:48:37 +0000
commit48405219fbd43f4b309ca7c820e70e59e6375e5d (patch)
treea0ce8f50353b106b7abf5aa85fb96647d9484e1d
parentab53f0f24e6ed01124b189a285686087a337b31b (diff)
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>
-rw-r--r--src/widgets/dialogs/qdialog.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp
index e7b526445e..f8fc18d13d 100644
--- a/src/widgets/dialogs/qdialog.cpp
+++ b/src/widgets/dialogs/qdialog.cpp
@@ -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