diff --git a/examples/opengl/2dpainting/window.cpp b/examples/opengl/2dpainting/window.cpp
index e10d862607be69d5193410af0d46e3038f2d4560..4734026dfb2a2046a6aa07184c9b8c221b48edc3 100644
--- a/examples/opengl/2dpainting/window.cpp
+++ b/examples/opengl/2dpainting/window.cpp
@@ -66,8 +66,8 @@ Window::Window()
     setLayout(layout);
 
     QTimer *timer = new QTimer(this);
-    connect(timer, SIGNAL(timeout()), native, SLOT(animate()));
-    connect(timer, SIGNAL(timeout()), openGL, SLOT(animate()));
+    connect(timer, &QTimer::timeout, native, &Widget::animate);
+    connect(timer, &QTimer::timeout, openGL, &GLWidget::animate);
     timer->start(50);
 }
 //! [0]
diff --git a/examples/opengl/contextinfo/renderwindow.cpp b/examples/opengl/contextinfo/renderwindow.cpp
index 9d7e2c450e65d338ba2092e53ef3566df8165945..fefcf0e56ddf03960f0cfac2515374e50615e791 100644
--- a/examples/opengl/contextinfo/renderwindow.cpp
+++ b/examples/opengl/contextinfo/renderwindow.cpp
@@ -221,5 +221,5 @@ void RenderWindow::render()
     // only here to make the UI widgets more responsive on slower machines. We
     // can afford it since our rendering is so lightweight.
     const int interval = 5;
-    QTimer::singleShot(interval, this, SLOT(render()));
+    QTimer::singleShot(interval, this, &RenderWindow::render);
 }
diff --git a/examples/opengl/hellogles3/glwindow.cpp b/examples/opengl/hellogles3/glwindow.cpp
index ad654b854cef99cb2274684410d36467fd6e64db..a0deb8ecfb6a49284a65e8c018a6888fefbf8aeb 100644
--- a/examples/opengl/hellogles3/glwindow.cpp
+++ b/examples/opengl/hellogles3/glwindow.cpp
@@ -92,7 +92,7 @@ GLWindow::GLWindow()
     rAnim->setLoopCount(-1);
     rAnim->start();
 
-    QTimer::singleShot(4000, this, SLOT(startSecondStage()));
+    QTimer::singleShot(4000, this, &GLWindow::startSecondStage);
 }
 
 GLWindow::~GLWindow()
diff --git a/examples/opengl/hellowindow/hellowindow.cpp b/examples/opengl/hellowindow/hellowindow.cpp
index 7674ffaed848ee7485c9d45a69d8a94ae38f4d92..bc58e1a0e459a4aad3b7c909f6c7d6a3e04ebee0 100644
--- a/examples/opengl/hellowindow/hellowindow.cpp
+++ b/examples/opengl/hellowindow/hellowindow.cpp
@@ -119,7 +119,7 @@ void Renderer::setAnimating(HelloWindow *window, bool animating)
     if (animating) {
         m_windows << window;
         if (m_windows.size() == 1)
-            QTimer::singleShot(0, this, SLOT(render()));
+            QTimer::singleShot(0, this, &Renderer::render);
     } else {
         m_currentWindow = 0;
         m_windows.removeOne(window);
@@ -184,7 +184,7 @@ void Renderer::render()
 
     m_fAngle += 1.0f;
 
-    QTimer::singleShot(0, this, SLOT(render()));
+    QTimer::singleShot(0, this, &Renderer::render);
 }
 
 Q_GLOBAL_STATIC(QMutex, initMutex)
diff --git a/examples/opengl/hellowindow/main.cpp b/examples/opengl/hellowindow/main.cpp
index 716280aa5f8b02f1f53fb881d9c5d4d133983843..f665ee6fa8724ce9a83fef0ed8f5337455319d7f 100644
--- a/examples/opengl/hellowindow/main.cpp
+++ b/examples/opengl/hellowindow/main.cpp
@@ -121,13 +121,13 @@ int main(int argc, char *argv[])
     }
 
     for (int i = 0; i < renderThreads.size(); ++i) {
-        QObject::connect(qGuiApp, SIGNAL(lastWindowClosed()), renderThreads.at(i), SLOT(quit()));
+        QObject::connect(qGuiApp, &QGuiApplication::lastWindowClosed, renderThreads.at(i), &QThread::quit);
         renderThreads.at(i)->start();
     }
 
     // Quit after 10 seconds. For platforms that do not have windows that are closeable.
     if (QCoreApplication::arguments().contains(QStringLiteral("--timeout")))
-        QTimer::singleShot(10000, qGuiApp, SLOT(quit()));
+        QTimer::singleShot(10000, qGuiApp, &QCoreApplication::quit);
 
     const int exitValue = app.exec();
 
diff --git a/examples/opengl/paintedwindow/paintedwindow.cpp b/examples/opengl/paintedwindow/paintedwindow.cpp
index c67edb6f6578d0eb00992bfe0b3293b8c65e050b..6b015bd2c3c45101155aaf4d56ef3078911824f8 100644
--- a/examples/opengl/paintedwindow/paintedwindow.cpp
+++ b/examples/opengl/paintedwindow/paintedwindow.cpp
@@ -83,9 +83,11 @@ PaintedWindow::PaintedWindow()
     m_targetOrientation = contentOrientation();
     m_nextTargetOrientation = Qt::PrimaryOrientation;
 
-    connect(screen(), SIGNAL(orientationChanged(Qt::ScreenOrientation)), this, SLOT(orientationChanged(Qt::ScreenOrientation)));
-    connect(m_animation, SIGNAL(finished()), this, SLOT(rotationDone()));
-    connect(this, SIGNAL(rotationChanged(qreal)), this, SLOT(paint()));
+    connect(screen(), &QScreen::orientationChanged, this, &PaintedWindow::orientationChanged);
+    connect(m_animation, &QAbstractAnimation::finished, this, &PaintedWindow::rotationDone);
+    typedef void (PaintedWindow::*PaintedWindowVoidSlot)();
+    connect(this, &PaintedWindow::rotationChanged,
+            this, static_cast<PaintedWindowVoidSlot>(&PaintedWindow::paint));
 }
 
 void PaintedWindow::exposeEvent(QExposeEvent *)
diff --git a/examples/opengl/qopenglwidget/mainwindow.cpp b/examples/opengl/qopenglwidget/mainwindow.cpp
index 22111afdcbf6f02ec24b759613a7ab50180d1a59..06f35db97a55343889a3a7666ff78055bf5ccc73 100644
--- a/examples/opengl/qopenglwidget/mainwindow.cpp
+++ b/examples/opengl/qopenglwidget/mainwindow.cpp
@@ -51,6 +51,8 @@
 
 #include "glwidget.h"
 
+typedef void (QWidget::*QWidgetVoidSlot)();
+
 MainWindow::MainWindow()
     : m_nextX(1), m_nextY(1)
 {
@@ -107,34 +109,27 @@ MainWindow::MainWindow()
 
     groupBox->setLayout(m_layout);
 
+
     QMenu *fileMenu = menuBar()->addMenu("&File");
+    fileMenu->addAction("E&xit", this, &QWidget::close);
     QMenu *showMenu = menuBar()->addMenu("&Show");
-    QMenu *helpMenu = menuBar()->addMenu("&Help");
-    QAction *exit = new QAction("E&xit", fileMenu);
-    QAction *aboutQt = new QAction("About Qt", helpMenu);
-    QAction *showLogo = new QAction("Show 3D Logo", showMenu);
-    QAction *showTexture = new QAction("Show 2D Texture", showMenu);
-    QAction *showBubbles = new QAction("Show bubbles", showMenu);
+    showMenu->addAction("Show 3D Logo", glwidget, &GLWidget::setLogo);
+    showMenu->addAction("Show 2D Texture", glwidget, &GLWidget::setTexture);
+    QAction *showBubbles = showMenu->addAction("Show bubbles", glwidget, &GLWidget::setShowBubbles);
     showBubbles->setCheckable(true);
     showBubbles->setChecked(true);
-    fileMenu->addAction(exit);
-    helpMenu->addAction(aboutQt);
-    showMenu->addAction(showLogo);
-    showMenu->addAction(showTexture);
-    showMenu->addAction(showBubbles);
-
-    connect(exit, SIGNAL(triggered(bool)), this, SLOT(close()));
-    connect(aboutQt, SIGNAL(triggered(bool)), qApp, SLOT(aboutQt()));
+    QMenu *helpMenu = menuBar()->addMenu("&Help");
+    helpMenu->addAction("About Qt", qApp, &QApplication::aboutQt);
 
-    connect(m_timer, SIGNAL(timeout()), glwidget, SLOT(update()));
+    connect(m_timer, &QTimer::timeout,
+            glwidget, static_cast<QWidgetVoidSlot>(&QWidget::update));
 
-    connect(showLogo, SIGNAL(triggered(bool)), glwidget, SLOT(setLogo()));
-    connect(showTexture, SIGNAL(triggered(bool)), glwidget, SLOT(setTexture()));
-    connect(showBubbles, SIGNAL(triggered(bool)), glwidget, SLOT(setShowBubbles(bool)));
-    connect(slider, SIGNAL(valueChanged(int)), glwidget, SLOT(setScaling(int)));
+    connect(slider, &QAbstractSlider::valueChanged, glwidget, &GLWidget::setScaling);
     connect(transparent, &QCheckBox::toggled, glwidget, &GLWidget::setTransparent);
 
-    connect(updateInterval, SIGNAL(valueChanged(int)), this, SLOT(updateIntervalChanged(int)));
+    typedef void (QSpinBox::*QSpinBoxIntSignal)(int);
+    connect(updateInterval, static_cast<QSpinBoxIntSignal>(&QSpinBox::valueChanged),
+            this, &MainWindow::updateIntervalChanged);
     connect(timerBased, &QCheckBox::toggled, this, &MainWindow::timerUsageChanged);
     connect(timerBased, &QCheckBox::toggled, updateInterval, &QWidget::setEnabled);
 
@@ -157,7 +152,7 @@ void MainWindow::addNew()
         return;
     GLWidget *w = new GLWidget(this, false, qRgb(qrand() % 256, qrand() % 256, qrand() % 256));
     m_glWidgets << w;
-    connect(m_timer, SIGNAL(timeout()), w, SLOT(update()));
+    connect(m_timer, &QTimer::timeout, w, static_cast<QWidgetVoidSlot>(&QWidget::update));
     m_layout->addWidget(w, m_nextY, m_nextX, 1, 1);
     if (m_nextX == 3) {
         m_nextX = 1;
diff --git a/examples/opengl/qopenglwindow/main.cpp b/examples/opengl/qopenglwindow/main.cpp
index 123bebbe2a359c0182ac0dea01a16ea2ba3095ce..f444b5d7c7ec753dd0321742ae4b8abcf5c9d0aa 100644
--- a/examples/opengl/qopenglwindow/main.cpp
+++ b/examples/opengl/qopenglwindow/main.cpp
@@ -163,16 +163,20 @@ void OpenGLWindow::keyPressEvent(QKeyEvent *e)
 
 void OpenGLWindow::setAnimating(bool enabled)
 {
+    typedef void (QPaintDeviceWindow::*QPaintDeviceWindowVoidSlot)();
+
     if (enabled) {
         // Animate continuously, throttled by the blocking swapBuffers() call the
         // QOpenGLWindow internally executes after each paint. Once that is done
         // (frameSwapped signal is emitted), we schedule a new update. This
         // obviously assumes that the swap interval (see
         // QSurfaceFormat::setSwapInterval()) is non-zero.
-        connect(this, SIGNAL(frameSwapped()), this, SLOT(update()));
+        connect(this, &QOpenGLWindow::frameSwapped,
+                this, static_cast<QPaintDeviceWindowVoidSlot>(&QPaintDeviceWindow::update));
         update();
     } else {
-        disconnect(this, SIGNAL(frameSwapped()), this, SLOT(update()));
+        disconnect(this, &QOpenGLWindow::frameSwapped,
+                   this, static_cast<QPaintDeviceWindowVoidSlot>(&QPaintDeviceWindow::update));
     }
 }
 
diff --git a/examples/opengl/textures/window.cpp b/examples/opengl/textures/window.cpp
index e9ad8e2cc6495283fc6d0d91ee3fefdedee74c14..fddb9f9945384d6d18a71a9954cbc447add00c5e 100644
--- a/examples/opengl/textures/window.cpp
+++ b/examples/opengl/textures/window.cpp
@@ -59,8 +59,8 @@ Window::Window()
             glWidgets[i][j]->rotateBy(+42 * 16, +42 * 16, -21 * 16);
             mainLayout->addWidget(glWidgets[i][j], i, j);
 
-            connect(glWidgets[i][j], SIGNAL(clicked()),
-                    this, SLOT(setCurrentGlWidget()));
+            connect(glWidgets[i][j], &GLWidget::clicked,
+                    this, &Window::setCurrentGlWidget);
         }
     }
     setLayout(mainLayout);
@@ -68,7 +68,7 @@ Window::Window()
     currentGlWidget = glWidgets[0][0];
 
     QTimer *timer = new QTimer(this);
-    connect(timer, SIGNAL(timeout()), this, SLOT(rotateOneStep()));
+    connect(timer, &QTimer::timeout, this, &Window::rotateOneStep);
     timer->start(20);
 
     setWindowTitle(tr("Textures"));