summaryrefslogtreecommitdiffstats
path: root/examples/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets')
-rw-r--r--examples/widgets/richtext/orderform/detailsdialog.cpp4
-rw-r--r--examples/widgets/richtext/orderform/mainwindow.cpp4
-rw-r--r--examples/widgets/tools/echoplugin/echowindow/echowindow.cpp8
-rw-r--r--examples/widgets/widgets/digitalclock/digitalclock.cpp2
4 files changed, 9 insertions, 9 deletions
diff --git a/examples/widgets/richtext/orderform/detailsdialog.cpp b/examples/widgets/richtext/orderform/detailsdialog.cpp
index 3ec13c4c70..9ef9eff73d 100644
--- a/examples/widgets/richtext/orderform/detailsdialog.cpp
+++ b/examples/widgets/richtext/orderform/detailsdialog.cpp
@@ -71,8 +71,8 @@ DetailsDialog::DetailsDialog(const QString &title, QWidget *parent)
buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
| QDialogButtonBox::Cancel);
- connect(buttonBox, SIGNAL(accepted()), this, SLOT(verify()));
- connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+ connect(buttonBox, &QDialogButtonBox::accepted, this, &DetailsDialog::verify);
+ connect(buttonBox, &QDialogButtonBox::rejected, this, &DetailsDialog::reject);
//! [0]
//! [1]
diff --git a/examples/widgets/richtext/orderform/mainwindow.cpp b/examples/widgets/richtext/orderform/mainwindow.cpp
index 030072978e..b207ee4dbc 100644
--- a/examples/widgets/richtext/orderform/mainwindow.cpp
+++ b/examples/widgets/richtext/orderform/mainwindow.cpp
@@ -75,8 +75,8 @@ MainWindow::MainWindow()
letters = new QTabWidget;
- connect(newAction, SIGNAL(triggered()), this, SLOT(openDialog()));
- connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
+ connect(newAction, &QAction::triggered, this, &MainWindow::openDialog);
+ connect(quitAction, &QAction::triggered, this, &MainWindow::close);
setCentralWidget(letters);
setWindowTitle(tr("Order Form"));
diff --git a/examples/widgets/tools/echoplugin/echowindow/echowindow.cpp b/examples/widgets/tools/echoplugin/echowindow/echowindow.cpp
index 1efc7b9355..64b59d506e 100644
--- a/examples/widgets/tools/echoplugin/echowindow/echowindow.cpp
+++ b/examples/widgets/tools/echoplugin/echowindow/echowindow.cpp
@@ -83,10 +83,10 @@ void EchoWindow::createGUI()
label->setFrameStyle(QFrame::Box | QFrame::Plain);
button = new QPushButton(tr("Send Message"));
- connect(lineEdit, SIGNAL(editingFinished()),
- this, SLOT(sendEcho()));
- connect(button, SIGNAL(clicked()),
- this, SLOT(sendEcho()));
+ connect(lineEdit, &QLineEdit::editingFinished,
+ this, &EchoWindow::sendEcho);
+ connect(button, &QPushButton::clicked,
+ this, &EchoWindow::sendEcho);
layout = new QGridLayout;
layout->addWidget(new QLabel(tr("Message:")), 0, 0);
diff --git a/examples/widgets/widgets/digitalclock/digitalclock.cpp b/examples/widgets/widgets/digitalclock/digitalclock.cpp
index 6787c975c5..dec7e64fc3 100644
--- a/examples/widgets/widgets/digitalclock/digitalclock.cpp
+++ b/examples/widgets/widgets/digitalclock/digitalclock.cpp
@@ -59,7 +59,7 @@ DigitalClock::DigitalClock(QWidget *parent)
setSegmentStyle(Filled);
QTimer *timer = new QTimer(this);
- connect(timer, SIGNAL(timeout()), this, SLOT(showTime()));
+ connect(timer, &QTimer::timeout, this, &DigitalClock::showTime);
timer->start(1000);
showTime();