summaryrefslogtreecommitdiffstats
path: root/src/widgets/doc/snippets/qtablewidget-resizing/mainwindow.cpp
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-02-03 19:55:51 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-02-05 16:54:53 +0000
commit3514aedbf36b96f6e03f88c9c7814b6ba50aac8f (patch)
tree12b217941ade632b464a365acf3dc6be7ce8509d /src/widgets/doc/snippets/qtablewidget-resizing/mainwindow.cpp
parentb76a923a8e81f5fabe6e48ed467e5326275fae4e (diff)
QtWidgets documentation: cleanup
Cleanup the QtWidgets documentation: - use new signal/slot syntax - use range-based for loop instead foreach Change-Id: I621b1ddac108d3df676209241d93d9b4f04a25fe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/widgets/doc/snippets/qtablewidget-resizing/mainwindow.cpp')
-rw-r--r--src/widgets/doc/snippets/qtablewidget-resizing/mainwindow.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/doc/snippets/qtablewidget-resizing/mainwindow.cpp b/src/widgets/doc/snippets/qtablewidget-resizing/mainwindow.cpp
index 95113153e1..d2c50336f6 100644
--- a/src/widgets/doc/snippets/qtablewidget-resizing/mainwindow.cpp
+++ b/src/widgets/doc/snippets/qtablewidget-resizing/mainwindow.cpp
@@ -48,7 +48,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "mainwindow.h"
@@ -72,9 +72,9 @@ MainWindow::MainWindow()
//! [0]
tableWidget->setSelectionMode(QAbstractItemView::ExtendedSelection);
- connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
- connect(tableWidthAction, SIGNAL(triggered()), this, SLOT(changeWidth()));
- connect(tableHeightAction, SIGNAL(triggered()), this, SLOT(changeHeight()));
+ connect(quitAction, &QAction::triggered, this, &QWidget::close);
+ connect(tableWidthAction, &QAction::triggered, this, &MainWindow::changeWidth);
+ connect(tableHeightAction, &QAction::triggered, this, &MainWindow::changeHeight);
setupTableItems();