diff options
Diffstat (limited to 'examples/assistant/simpletextviewer/mainwindow.cpp')
-rw-r--r-- | examples/assistant/simpletextviewer/mainwindow.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/assistant/simpletextviewer/mainwindow.cpp b/examples/assistant/simpletextviewer/mainwindow.cpp index 5b0564ca1..f70162c21 100644 --- a/examples/assistant/simpletextviewer/mainwindow.cpp +++ b/examples/assistant/simpletextviewer/mainwindow.cpp @@ -112,26 +112,26 @@ void MainWindow::createActions() { assistantAct = new QAction(tr("Help Contents"), this); assistantAct->setShortcut(QKeySequence::HelpContents); - connect(assistantAct, SIGNAL(triggered()), this, SLOT(showDocumentation())); + connect(assistantAct, &QAction::triggered, this, &MainWindow::showDocumentation); //! [4] openAct = new QAction(tr("&Open..."), this); openAct->setShortcut(QKeySequence::Open); - connect(openAct, SIGNAL(triggered()), this, SLOT(open())); + connect(openAct, &QAction::triggered, this, &MainWindow::open); clearAct = new QAction(tr("&Clear"), this); clearAct->setShortcut(tr("Ctrl+C")); - connect(clearAct, SIGNAL(triggered()), textViewer, SLOT(clear())); + connect(clearAct, &QAction::triggered, textViewer, &QTextEdit::clear); exitAct = new QAction(tr("E&xit"), this); exitAct->setShortcuts(QKeySequence::Quit); - connect(exitAct, SIGNAL(triggered()), this, SLOT(close())); + connect(exitAct, &QAction::triggered, this, &QWidget::close); aboutAct = new QAction(tr("&About"), this); - connect(aboutAct, SIGNAL(triggered()), this, SLOT(about())); + connect(aboutAct, &QAction::triggered, this, &MainWindow::about); aboutQtAct = new QAction(tr("About &Qt"), this); - connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt())); + connect(aboutQtAct, &QAction::triggered, QApplication::aboutQt); //! [5] } //! [5] |