summaryrefslogtreecommitdiffstats
path: root/examples/widgets/dialogs/standarddialogs/dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/dialogs/standarddialogs/dialog.cpp')
-rw-r--r--examples/widgets/dialogs/standarddialogs/dialog.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/widgets/dialogs/standarddialogs/dialog.cpp b/examples/widgets/dialogs/standarddialogs/dialog.cpp
index fdd3633950..3630f48ef3 100644
--- a/examples/widgets/dialogs/standarddialogs/dialog.cpp
+++ b/examples/widgets/dialogs/standarddialogs/dialog.cpp
@@ -47,6 +47,9 @@
"and any number of buttons, each with standard or custom texts." \
"<p>Click a button to close the message box. Pressing the Esc button " \
"will activate the detected escape button (if any).")
+#define MESSAGE_DETAILS \
+ Dialog::tr("If a message box has detailed text, the user can reveal it " \
+ "by pressing the Show Details... button.")
class DialogOptionsWidget : public QGroupBox
@@ -466,6 +469,7 @@ void Dialog::warningMessage()
{
QMessageBox msgBox(QMessageBox::Warning, tr("QMessageBox::warning()"),
MESSAGE, 0, this);
+ msgBox.setDetailedText(MESSAGE_DETAILS);
msgBox.addButton(tr("Save &Again"), QMessageBox::AcceptRole);
msgBox.addButton(tr("&Continue"), QMessageBox::RejectRole);
if (msgBox.exec() == QMessageBox::AcceptRole)