diff options
-rw-r--r-- | src/widgets/dialogs/qdialog.cpp | 11 |
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 |