diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2012-04-20 16:55:59 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-21 17:29:40 +0200 |
commit | 910b446fb22c9c5ab3cc65d4025efc5102d0c45e (patch) | |
tree | 02b1470ccdbe09bfc8a24694447a7a136fd9b7fb /examples/tools | |
parent | fcec903da7ce0ec2b95d0b1d639885c6fc71f9c3 (diff) |
Examples: Don't use deprecated methods
Change-Id: Ib6e795f6b5bb6a3ac19882a5fb224460ef1fc8ad
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'examples/tools')
5 files changed, 11 insertions, 11 deletions
diff --git a/examples/tools/completer/mainwindow.cpp b/examples/tools/completer/mainwindow.cpp index bc80bc939f..4d989c3d61 100644 --- a/examples/tools/completer/mainwindow.cpp +++ b/examples/tools/completer/mainwindow.cpp @@ -242,8 +242,8 @@ void MainWindow::changeModel() treeView->setRootIsDecorated(false); treeView->header()->hide(); treeView->header()->setStretchLastSection(false); - treeView->header()->setResizeMode(0, QHeaderView::Stretch); - treeView->header()->setResizeMode(1, QHeaderView::ResizeToContents); + treeView->header()->setSectionResizeMode(0, QHeaderView::Stretch); + treeView->header()->setSectionResizeMode(1, QHeaderView::ResizeToContents); contentsLabel->setText(tr("Enter name of your country")); } break; diff --git a/examples/tools/plugandpaint/mainwindow.cpp b/examples/tools/plugandpaint/mainwindow.cpp index 472e10120d..c33c5be518 100644 --- a/examples/tools/plugandpaint/mainwindow.cpp +++ b/examples/tools/plugandpaint/mainwindow.cpp @@ -116,10 +116,10 @@ void MainWindow::brushColor() void MainWindow::brushWidth() { bool ok; - const int newWidth = QInputDialog::getInteger(this, tr("Plug & Paint"), - tr("Select brush width:"), - paintArea->brushWidth(), - 1, 50, 1, &ok); + const int newWidth = QInputDialog::getInt(this, tr("Plug & Paint"), + tr("Select brush width:"), + paintArea->brushWidth(), + 1, 50, 1, &ok); if (ok) paintArea->setBrushWidth(newWidth); } diff --git a/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.cpp b/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.cpp index 186f364b77..f7f5310ea9 100644 --- a/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.cpp +++ b/examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.cpp @@ -73,7 +73,7 @@ QImage ExtraFiltersPlugin::filterImage(const QString &filter, } } else if (filter == tr("Smudge...")) { bool ok; - int numIters = QInputDialog::getInteger(parent, tr("Smudge Filter"), + int numIters = QInputDialog::getInt(parent, tr("Smudge Filter"), tr("Enter number of iterations:"), 5, 1, 20, 1, &ok); if (ok) { @@ -102,7 +102,7 @@ QImage ExtraFiltersPlugin::filterImage(const QString &filter, } } else if (filter == tr("Threshold...")) { bool ok; - int threshold = QInputDialog::getInteger(parent, tr("Threshold Filter"), + int threshold = QInputDialog::getInt(parent, tr("Threshold Filter"), tr("Enter threshold:"), 10, 1, 256, 1, &ok); if (ok) { diff --git a/examples/tools/settingseditor/locationdialog.cpp b/examples/tools/settingseditor/locationdialog.cpp index e1ec636202..192aaab1b0 100644 --- a/examples/tools/settingseditor/locationdialog.cpp +++ b/examples/tools/settingseditor/locationdialog.cpp @@ -89,7 +89,7 @@ LocationDialog::LocationDialog(QWidget *parent) locationsTable->setEditTriggers(QAbstractItemView::NoEditTriggers); locationsTable->setColumnCount(2); locationsTable->setHorizontalHeaderLabels(labels); - locationsTable->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch); + locationsTable->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Stretch); locationsTable->horizontalHeader()->resizeSection(1, 180); buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok diff --git a/examples/tools/settingseditor/settingstree.cpp b/examples/tools/settingseditor/settingstree.cpp index b5b3457651..4966ff98d9 100644 --- a/examples/tools/settingseditor/settingstree.cpp +++ b/examples/tools/settingseditor/settingstree.cpp @@ -51,8 +51,8 @@ SettingsTree::SettingsTree(QWidget *parent) QStringList labels; labels << tr("Setting") << tr("Type") << tr("Value"); setHeaderLabels(labels); - header()->setResizeMode(0, QHeaderView::Stretch); - header()->setResizeMode(2, QHeaderView::Stretch); + header()->setSectionResizeMode(0, QHeaderView::Stretch); + header()->setSectionResizeMode(2, QHeaderView::Stretch); settings = 0; refreshTimer.setInterval(2000); |