diff --git a/config.tests/unix/lgmon/lgmon.cpp b/config.tests/unix/lgmon/lgmon.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..49357758062f913303212072f45e2c2fe5e168f6
--- /dev/null
+++ b/config.tests/unix/lgmon/lgmon.cpp
@@ -0,0 +1,49 @@
+/***************************************************************************
+**
+** Copyright (C) 2014 BlackBerry Limited. All rights reserved.
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.  For licensing terms and
+** conditions see http://qt.digia.com/licensing.  For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights.  These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <lgmon.h>
+
+int main(int, char **)
+{
+    lgmon_supported(getpid());
+    return 0;
+}
+
diff --git a/config.tests/unix/lgmon/lgmon.pro b/config.tests/unix/lgmon/lgmon.pro
new file mode 100644
index 0000000000000000000000000000000000000000..7bd094dc86c76c3239c438b7036c4f9a2846687c
--- /dev/null
+++ b/config.tests/unix/lgmon/lgmon.pro
@@ -0,0 +1,3 @@
+SOURCES = lgmon.cpp
+CONFIG -= qt
+LIBS += -llgmon
diff --git a/configure b/configure
index dc23bb4eb6ede2814c00993e79e36fc515b6f093..e491836533df3dd2d3c70183c814633d96426f29 100755
--- a/configure
+++ b/configure
@@ -633,6 +633,7 @@ CFG_STACK_PROTECTOR_STRONG=auto
 CFG_SLOG2=auto
 CFG_PPS=auto
 CFG_QNX_IMF=auto
+CFG_LGMON=auto
 CFG_SYSTEM_PROXIES=no
 
 # Target architecture
@@ -1800,6 +1801,13 @@ while [ "$#" -gt 0 ]; do
             UNKNOWN_OPT=yes
         fi
         ;;
+    lgmon)
+        if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+            CFG_LGMON="$VAL"
+        else
+            UNKNOWN_OPT=yes
+        fi
+        ;;
     gtkstyle)
         if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
             CFG_QGTKSTYLE="$VAL"
@@ -2502,6 +2510,9 @@ QNX/Blackberry options:
     -no-imf ............ Do not compile with imf support.
     -imf ............... Compile with imf support.
 
+    -no-lgmon .......... Do not compile with lgmon support.
+    -lgmon ............. Compile with lgmon support.
+
 MacOS/iOS options:
 
     -Fstring ........... Add an explicit framework path.
@@ -4416,6 +4427,15 @@ if [ "$XPLATFORM_QNX" = "yes" ]; then
             CFG_PPS=no
         fi
     fi
+
+    if [ "$CFG_LGMON" != "no" ]; then
+        if compileTest unix/lgmon "lgmon"; then
+            CFG_LGMON=yes
+            QMAKE_CONFIG="$QMAKE_CONFIG lgmon"
+        else
+            CFG_LGMON=no
+        fi
+    fi
 fi
 
 if [ "$CFG_ZLIB" = "auto" ]; then
@@ -6841,6 +6861,7 @@ if [ "$XPLATFORM_QNX" = "yes" ]; then
     report_support "  SLOG2 .................." "$CFG_SLOG2"
     report_support "  IMF ...................." "$CFG_QNX_IMF"
     report_support "  PPS ...................." "$CFG_PPS"
+    report_support "  LGMON .................." "$CFG_LGMON"
 fi
 report_support "  SQL drivers:"
 report_support "    DB2 .................." "$CFG_SQL_db2" plugin "plugin" yes "built into QtSql"
diff --git a/qtbase.pro b/qtbase.pro
index 140a1370997339cbf38b5194776c50ee43afd361..1cd82bbc84c0bba50a8c056de346b9230b1d7055 100644
--- a/qtbase.pro
+++ b/qtbase.pro
@@ -32,6 +32,7 @@ unix {
 			(cd config.tests/unix/libjpeg && $(MAKE) distclean); \
 			(cd config.tests/unix/libpng && $(MAKE) distclean); \
                         (cd config.tests/unix/slog2 && $(MAKE) distclean); \
+                        (cd config.tests/unix/lgmon && $(MAKE) distclean); \
 			(cd config.tests/x11/xcursor && $(MAKE) distclean); \
 			(cd config.tests/x11/xrender && $(MAKE) distclean); \
 			(cd config.tests/x11/xrandr && $(MAKE) distclean); \
diff --git a/src/plugins/platforms/qnx/main.cpp b/src/plugins/platforms/qnx/main.cpp
index 50779d3e12710cf9b56cab42e8164a69a8c88f6d..01e71b381046759f6cdc276db4ce9afca452dfc1 100644
--- a/src/plugins/platforms/qnx/main.cpp
+++ b/src/plugins/platforms/qnx/main.cpp
@@ -1,6 +1,6 @@
 /***************************************************************************
 **
-** Copyright (C) 2011 - 2012 Research In Motion
+** Copyright (C) 2011 - 2014 BlackBerry Limited. All rights reserved.
 ** Contact: http://www.qt-project.org/legal
 **
 ** This file is part of the plugins of the Qt Toolkit.
@@ -41,13 +41,16 @@
 
 #include "main.h"
 #include "qqnxintegration.h"
+#include "qqnxlgmon.h"
 
 QT_BEGIN_NAMESPACE
 
 QPlatformIntegration *QQnxIntegrationPlugin::create(const QString& system, const QStringList& paramList)
 {
-    if (!system.compare(QLatin1String("qnx"), Qt::CaseInsensitive))
+    if (!system.compare(QLatin1String("qnx"), Qt::CaseInsensitive)) {
+        qqnxLgmonInit();
         return new QQnxIntegration(paramList);
+    }
 
     return 0;
 }
diff --git a/src/plugins/platforms/qnx/qnx.pro b/src/plugins/platforms/qnx/qnx.pro
index c60512609124b0c861cd26e5357f4b9972c940ea..2399a91c1224dfe1185c74e7e00e3db59829bf1a 100644
--- a/src/plugins/platforms/qnx/qnx.pro
+++ b/src/plugins/platforms/qnx/qnx.pro
@@ -65,7 +65,8 @@ HEADERS =   main.h \
             qqnxcursor.h \
             qqnxrasterwindow.h \
             qqnxscreeneventfilter.h \
-            qqnxglobal.h
+            qqnxglobal.h \
+            qqnxlgmon.h
 
 CONFIG(qqnx_screeneventthread) {
     DEFINES += QQNX_SCREENEVENTTHREAD
@@ -145,6 +146,12 @@ CONFIG(qqnx_pps) {
     }
 }
 
+lgmon {
+    DEFINES += QQNX_LGMON
+    SOURCES += qqnxlgmon.cpp
+    LIBS += -llgmon
+}
+
 OTHER_FILES += qnx.json
 
 QMAKE_CXXFLAGS += -I./private
diff --git a/src/plugins/platforms/qnx/qqnxeglwindow.cpp b/src/plugins/platforms/qnx/qqnxeglwindow.cpp
index 45a7bab8717a2da66015e347c42b1faf8982a321..3c08cc9f82c826f6f07bc0ba8efa828f8a6b1748 100644
--- a/src/plugins/platforms/qnx/qqnxeglwindow.cpp
+++ b/src/plugins/platforms/qnx/qqnxeglwindow.cpp
@@ -1,6 +1,6 @@
 /***************************************************************************
 **
-** Copyright (C) 2013 BlackBerry Limited. All rights reserved.
+** Copyright (C) 2013 - 2014 BlackBerry Limited. All rights reserved.
 ** Contact: http://www.qt-project.org/legal
 **
 ** This file is part of the plugins of the Qt Toolkit.
@@ -135,8 +135,7 @@ void QQnxEglWindow::swapEGLBuffers()
     if (eglResult != EGL_TRUE)
         qFatal("QQNX: failed to swap EGL buffers, err=%d", eglGetError());
 
-    if (m_cover)
-        m_cover->updateCover();
+    windowPosted();
 }
 
 EGLSurface QQnxEglWindow::getSurface()
diff --git a/src/plugins/platforms/qnx/qqnxlgmon.cpp b/src/plugins/platforms/qnx/qqnxlgmon.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..3c8d1c11a53c73e768c62180f72a4b839dbca41d
--- /dev/null
+++ b/src/plugins/platforms/qnx/qqnxlgmon.cpp
@@ -0,0 +1,49 @@
+/***************************************************************************
+**
+** Copyright (C) 2014 BlackBerry Limited. All rights reserved.
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.  For licensing terms and
+** conditions see http://qt.digia.com/licensing.  For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights.  These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qqnxlgmon.h"
+
+QT_BEGIN_NAMESPACE
+
+bool qqnxLgmonFirstFrame = true;
+
+QT_END_NAMESPACE
+
diff --git a/src/plugins/platforms/qnx/qqnxlgmon.h b/src/plugins/platforms/qnx/qqnxlgmon.h
new file mode 100644
index 0000000000000000000000000000000000000000..e3930ce93a187999d0e8883bf0d1793fa52751c1
--- /dev/null
+++ b/src/plugins/platforms/qnx/qqnxlgmon.h
@@ -0,0 +1,80 @@
+/***************************************************************************
+**
+** Copyright (C) 2014 BlackBerry Limited. All rights reserved.
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.  For licensing terms and
+** conditions see http://qt.digia.com/licensing.  For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights.  These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.  Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QQNXLGMON_H
+#define QQNXLGMON_H
+
+#include <qglobal.h>
+
+#if defined(QQNX_LGMON)
+#include <lgmon.h>
+#endif
+
+QT_BEGIN_NAMESPACE
+
+#if defined(QQNX_LGMON)
+
+extern bool qqnxLgmonFirstFrame;
+
+inline void qqnxLgmonInit()
+{
+    lgmon_supported(getpid());
+}
+
+inline void qqnxLgmonFramePosted(bool isCover)
+{
+    if (qqnxLgmonFirstFrame && !isCover) {
+        qqnxLgmonFirstFrame = false;
+        lgmon_app_ready_for_user_input(getpid());
+    }
+}
+
+#else
+
+inline void qqnxLgmonInit() {}
+inline void qqnxLgmonFramePosted(bool /*isCover*/) {}
+
+#endif
+
+QT_END_NAMESPACE
+
+#endif  // QQNXLGMON_H
+
diff --git a/src/plugins/platforms/qnx/qqnxrasterwindow.cpp b/src/plugins/platforms/qnx/qqnxrasterwindow.cpp
index 2c0639e8e32c9ab610b2d806db863b31e4c66ef0..eb9fac540f7c92bce5af5f49505f5300039813a1 100644
--- a/src/plugins/platforms/qnx/qqnxrasterwindow.cpp
+++ b/src/plugins/platforms/qnx/qqnxrasterwindow.cpp
@@ -1,6 +1,6 @@
 /***************************************************************************
 **
-** Copyright (C) 2013 BlackBerry Limited. All rights reserved.
+** Copyright (C) 2013 - 2014 BlackBerry Limited. All rights reserved.
 ** Contact: http://www.qt-project.org/legal
 **
 ** This file is part of the plugins of the Qt Toolkit.
@@ -123,8 +123,7 @@ void QQnxRasterWindow::post(const QRegion &dirty)
         m_previousDirty = dirty;
         m_scrolled = QRegion();
 
-        if (m_cover)
-            m_cover->updateCover();
+        windowPosted();
     }
 }
 
diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp
index bb76efea64f204c8bd3154089c113c9129466ecd..e57025cbc69414e85f78c47941374cc965035400 100644
--- a/src/plugins/platforms/qnx/qqnxwindow.cpp
+++ b/src/plugins/platforms/qnx/qqnxwindow.cpp
@@ -44,6 +44,7 @@
 #include "qqnxwindow.h"
 #include "qqnxintegration.h"
 #include "qqnxscreen.h"
+#include "qqnxlgmon.h"
 
 #include <QUuid>
 
@@ -705,5 +706,12 @@ void QQnxWindow::applyWindowState()
     }
 }
 
+void QQnxWindow::windowPosted()
+{
+    if (m_cover)
+        m_cover->updateCover();
+
+    qqnxLgmonFramePosted(m_cover);  // for performance measurements
+}
 
 QT_END_NAMESPACE
diff --git a/src/plugins/platforms/qnx/qqnxwindow.h b/src/plugins/platforms/qnx/qqnxwindow.h
index ea7b388e9fc0659d6c2efbd5edbda884b3cf0ee9..e97e941a08511e0154be0396280a119892c10f77 100644
--- a/src/plugins/platforms/qnx/qqnxwindow.h
+++ b/src/plugins/platforms/qnx/qqnxwindow.h
@@ -117,9 +117,9 @@ protected:
     virtual void resetBuffers() = 0;
 
     void initWindow();
+    void windowPosted();
 
     screen_context_t m_screenContext;
-    QScopedPointer<QQnxAbstractCover> m_cover;
 
 private:
     void createWindowGroup();
@@ -137,6 +137,7 @@ private:
     QQnxScreen *m_screen;
     QQnxWindow *m_parentWindow;
     QList<QQnxWindow*> m_childWindows;
+    QScopedPointer<QQnxAbstractCover> m_cover;
     bool m_visible;
     bool m_exposed;
     QRect m_unmaximizedGeometry;
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 350ce6308732b6c4bdb356ef97487bf0069d98d1..0553235b805fa045e797197a3646bf5175a6104f 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -197,6 +197,7 @@ Configure::Configure(int& argc, char** argv)
     dictionary[ "SLOG2" ]           = "no";
     dictionary[ "QNX_IMF" ]         = "no";
     dictionary[ "PPS" ]             = "no";
+    dictionary[ "LGMON" ]           = "no";
     dictionary[ "SYSTEM_PROXIES" ]  = "no";
     dictionary[ "WERROR" ]          = "auto";
     dictionary[ "QREAL" ]           = "double";
@@ -890,6 +891,10 @@ void Configure::parseCmdLine()
             dictionary[ "PPS" ] = "no";
         } else if (configCmdLine.at(i) == "-pps") {
             dictionary[ "PPS" ] = "yes";
+        } else if (configCmdLine.at(i) == "-no-lgmon") {
+            dictionary[ "LGMON" ] = "no";
+        } else if (configCmdLine.at(i) == "-lgmon") {
+            dictionary[ "LGMON" ] = "yes";
         } else if (configCmdLine.at(i) == "-no-system-proxies") {
             dictionary[ "SYSTEM_PROXIES" ] = "no";
         } else if (configCmdLine.at(i) == "-system-proxies") {
@@ -1666,6 +1671,7 @@ void Configure::applySpecSpecifics()
         dictionary["SLOG2"]                 = "auto";
         dictionary["QNX_IMF"]               = "auto";
         dictionary["PPS"]                   = "auto";
+        dictionary["LGMON"]                 = "auto";
         dictionary["QT_XKBCOMMON"]          = "no";
         dictionary[ "ANGLE" ]               = "no";
         dictionary[ "FONT_CONFIG" ]         = "auto";
@@ -1877,7 +1883,7 @@ bool Configure::displayHelp()
                                                         "by setting QT_HARFBUZZ environment variable to \"old\".");
         desc("HARFBUZZ", "system","-system-harfbuzz",   "(experimental) Use HarfBuzz-NG from the operating system\n"
                                                         "to do text shaping. It can still be disabled\n"
-                                                        "by setting QT_HARFBUZZ environment variable to \"old\".");
+                                                        "by setting QT_HARFBUZZ environment variable to \"old\".\n");
 
         if ((platform() == QNX) || (platform() == BLACKBERRY)) {
             desc("SLOG2", "yes",  "-slog2",             "Compile with slog2 support.");
@@ -1886,6 +1892,8 @@ bool Configure::displayHelp()
             desc("QNX_IMF", "no",  "-no-imf",           "Do not compile with imf support.");
             desc("PPS", "yes",  "-pps",                 "Compile with PPS support.");
             desc("PPS", "no",  "-no-pps",               "Do not compile with PPS support.");
+            desc("LGMON", "yes",  "-lgmon",             "Compile with lgmon support.");
+            desc("LGMON", "no",   "-no-lgmon",          "Do not compile with lgmon support.\n");
         }
 
         desc("ANGLE", "yes",       "-angle",            "Use the ANGLE implementation of OpenGL ES 2.0.");
@@ -2236,6 +2244,9 @@ bool Configure::checkAvailability(const QString &part)
         available = tryCompileProject("unix/qqnx_imf");
     } else if (part == "PPS") {
         available = (platform() == QNX || platform() == BLACKBERRY) && tryCompileProject("unix/pps");
+    } else if (part == "LGMON") {
+        available = (platform() == QNX || platform() == BLACKBERRY)
+                    && tryCompileProject("unix/lgmon");
     } else if (part == "NEON") {
         available = (dictionary["QT_ARCH"] == "arm") && tryCompileProject("unix/neon");
     } else if (part == "FONT_CONFIG") {
@@ -2389,6 +2400,10 @@ void Configure::autoDetection()
         dictionary["PPS"] = checkAvailability("PPS") ? "yes" : "no";
     }
 
+    if ((platform() == QNX || platform() == BLACKBERRY) && dictionary["LGMON"] == "auto") {
+        dictionary["LGMON"] = checkAvailability("LGMON") ? "yes" : "no";
+    }
+
     if (dictionary["QT_EVENTFD"] == "auto")
         dictionary["QT_EVENTFD"] = checkAvailability("QT_EVENTFD") ? "yes" : "no";
 
@@ -3244,6 +3259,9 @@ void Configure::generateQConfigPri()
         if (dictionary[ "PPS" ] == "yes")
             configStream << " qqnx_pps";
 
+        if (dictionary[ "LGMON" ] == "yes")
+            configStream << " lgmon";
+
         if (dictionary["DIRECTWRITE"] == "yes")
             configStream << " directwrite";
 
@@ -3620,6 +3638,7 @@ void Configure::displayConfig()
         sout << "    SLOG2 support..........." << dictionary[ "SLOG2" ] << endl;
         sout << "    IMF support............." << dictionary[ "QNX_IMF" ] << endl;
         sout << "    PPS support............." << dictionary[ "PPS" ] << endl;
+        sout << "    LGMON support..........." << dictionary[ "LGMON" ] << endl;
     }
     sout << "    ANGLE..................." << dictionary[ "ANGLE" ] << endl;
     sout << endl;