diff options
author | Casper van Donderen <casper.vandonderen@nokia.com> | 2011-09-30 07:56:46 (GMT) |
---|---|---|
committer | Casper van Donderen <casper.vandonderen@nokia.com> | 2011-09-30 07:56:46 (GMT) |
commit | 1a5b3356e5c07d4be19662fac1653ae98cddbbaa (patch) | |
tree | d6a129587483ba233b6d8908d1122864ce4ac2b1 | |
parent | b5062aeeb4ad321424246ecb8bf7a0ffb9ac9990 (diff) | |
download | Qt-1a5b3356e5c07d4be19662fac1653ae98cddbbaa.zip Qt-1a5b3356e5c07d4be19662fac1653ae98cddbbaa.tar.gz Qt-1a5b3356e5c07d4be19662fac1653ae98cddbbaa.tar.bz2 |
Add another part of the source code to the snippet.
Fixes: QTBUG-21765
-rw-r--r-- | examples/dialogs/extension/finddialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/qdialogbuttonbox.cpp | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/examples/dialogs/extension/finddialog.cpp b/examples/dialogs/extension/finddialog.cpp index 2ce0391..2457a5b 100644 --- a/examples/dialogs/extension/finddialog.cpp +++ b/examples/dialogs/extension/finddialog.cpp @@ -104,9 +104,11 @@ FindDialog::FindDialog(QWidget *parent) connect(backSoftKeyAction, SIGNAL(triggered()), qApp, SLOT(quit())); addAction(backSoftKeyAction); #else +//! [6] buttonBox = new QDialogButtonBox(Qt::Vertical); buttonBox->addButton(findButton, QDialogButtonBox::ActionRole); buttonBox->addButton(moreButton, QDialogButtonBox::ActionRole); +//! [6] connect(moreButton, SIGNAL(toggled(bool)), extension, SLOT(setVisible(bool))); #endif diff --git a/src/gui/widgets/qdialogbuttonbox.cpp b/src/gui/widgets/qdialogbuttonbox.cpp index 6c29141..e6842b3 100644 --- a/src/gui/widgets/qdialogbuttonbox.cpp +++ b/src/gui/widgets/qdialogbuttonbox.cpp @@ -94,6 +94,7 @@ QT_BEGIN_NAMESPACE specifying their role. \snippet examples/dialogs/extension/finddialog.cpp 1 + \snippet examples/dialogs/extension/finddialog.cpp 6 Alternatively, QDialogButtonBox provides several standard buttons (e.g. OK, Cancel, Save) that you can use. They exist as flags so you can OR them together in the constructor. |