From 48405219fbd43f4b309ca7c820e70e59e6375e5d Mon Sep 17 00:00:00 2001 From: Paul Wicking Date: Tue, 29 Jan 2019 13:36:02 +0100 Subject: [PATCH] Doc: Minor QDialog clarification Minor rewrite of a bit that caused some confusion. Fixes: QTBUG-73335 Change-Id: Ic1df44e62a29035c7b93052204fbe9ef72db5f40 Reviewed-by: Leena Miettinen --- src/widgets/dialogs/qdialog.cpp | 11 +++++------ 1 file 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