diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-07-17 13:19:45 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-07-17 13:21:15 (GMT) |
commit | 080231536cbc5e9acc486e57e165320416f66d85 (patch) | |
tree | 0cfafb4ee6efe9b02644b9d7ca41d19515d1c897 | |
parent | 866e6e6338767086cef8f97bc4e7b38e78b83651 (diff) | |
download | Qt-080231536cbc5e9acc486e57e165320416f66d85.zip Qt-080231536cbc5e9acc486e57e165320416f66d85.tar.gz Qt-080231536cbc5e9acc486e57e165320416f66d85.tar.bz2 |
Update the documentation after the change in the completer exemple
-rw-r--r-- | doc/src/examples/completer.qdoc | 16 | ||||
-rw-r--r-- | examples/tools/completer/mainwindow.cpp | 4 |
2 files changed, 14 insertions, 6 deletions
diff --git a/doc/src/examples/completer.qdoc b/doc/src/examples/completer.qdoc index 9aaaf66..3805a7c 100644 --- a/doc/src/examples/completer.qdoc +++ b/doc/src/examples/completer.qdoc @@ -100,9 +100,9 @@ \section1 MainWindow Class Definition - The \c MainWindow class is a subclass of QMainWindow and implements four - private slots - \c about(), \c changeCase(), \c changeMode(), and - \c changeModel(). + The \c MainWindow class is a subclass of QMainWindow and implements five + private slots - \c about(), \c changeCase(), \c changeMode(), \c changeModel(), + and \c changeMaxVisible(). \snippet examples/tools/completer/mainwindow.h 0 @@ -126,6 +126,9 @@ \snippet examples/tools/completer/mainwindow.cpp 0 + The \c maxVisibleSpinBox is created and determines the number of visible + item in the completer + The \c wrapCheckBox is then set up. This \c checkBox determines if the \c{completer}'s \l{QCompleter::setWrapAround()}{setWrapAround()} property is enabled or disabled. @@ -242,10 +245,15 @@ \snippet examples/tools/completer/mainwindow.cpp 14 - The \c about() function provides a brief description about the example. + The \c changeMaxVisible() update the maximum number of visible items in + the completer. \snippet examples/tools/completer/mainwindow.cpp 15 + The \c about() function provides a brief description about the example. + + \snippet examples/tools/completer/mainwindow.cpp 16 + \section1 \c main() Function The \c main() function instantiates QApplication and \c MainWindow and diff --git a/examples/tools/completer/mainwindow.cpp b/examples/tools/completer/mainwindow.cpp index 06f16de..c98482a 100644 --- a/examples/tools/completer/mainwindow.cpp +++ b/examples/tools/completer/mainwindow.cpp @@ -75,15 +75,15 @@ MainWindow::MainWindow(QWidget *parent) caseCombo->addItem(tr("Case Insensitive")); caseCombo->addItem(tr("Case Sensitive")); caseCombo->setCurrentIndex(0); +//! [0] +//! [1] QLabel *maxVisibleLabel = new QLabel; maxVisibleLabel->setText(tr("Max Visible Items")); maxVisibleSpinBox = new QSpinBox; maxVisibleSpinBox->setRange(3,25); maxVisibleSpinBox->setValue(10); -//! [0] -//! [1] wrapCheckBox = new QCheckBox; wrapCheckBox->setText(tr("Wrap around completions")); wrapCheckBox->setChecked(true); |