diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro
index f59ddb97a4dde1a0c211a1cc3bc78c12caa4d083..f958d426e0072c04ce41cb29eceda242ef3c198c 100644
--- a/src/plugins/plugins.pro
+++ b/src/plugins/plugins.pro
@@ -190,6 +190,7 @@ plugin_qmlprojectmanager.depends = plugin_texteditor
 plugin_qmlprojectmanager.depends += plugin_projectexplorer
 plugin_qmlprojectmanager.depends += plugin_qmljseditor
 plugin_qmlprojectmanager.depends += plugin_debugger
+plugin_qmlprojectmanager.depends += plugin_qt4projectmanager
 
 plugin_qmldesigner.subdir = qmldesigner
 plugin_qmldesigner.depends = plugin_coreplugin
diff --git a/src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec b/src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec
index eca6196a3e6b4521166ccf9064af6faa48f0f7bc..8e3405428e600f8a24d94c4058115b605386ea1a 100644
--- a/src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec
+++ b/src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec
@@ -18,5 +18,7 @@ Alternatively, this plugin may be used under the terms of the GNU Lesser General
         <dependency name="TextEditor" version="2.1.0"/>
         <dependency name="QmlJSEditor" version="2.1.0"/>
         <dependency name="Debugger" version="2.1.0" />
+        <dependency name="ProjectExplorer" version="2.1.0"/>
+        <dependency name="Qt4ProjectManager" version="2.1.0" />
     </dependencyList>
 </plugin>
diff --git a/src/plugins/qmlprojectmanager/qmlprojectmanager_dependencies.pri b/src/plugins/qmlprojectmanager/qmlprojectmanager_dependencies.pri
index 74bc6fed608e0dde35c780127d8320a60e847551..9cdedcd2c3c277fa4d6cb7e1a81c9a5f18cc500d 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectmanager_dependencies.pri
+++ b/src/plugins/qmlprojectmanager/qmlprojectmanager_dependencies.pri
@@ -2,3 +2,4 @@ include(../../plugins/projectexplorer/projectexplorer.pri)
 include(../../plugins/texteditor/texteditor.pri)
 include(../../plugins/qmljseditor/qmljseditor.pri)
 include(../../plugins/debugger/debugger.pri)
+include(../../plugins/qt4projectmanager/qt4projectmanager.pri)
diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
index 3b959f83af023b2a768f511780df1c3d43843039..3e3e75ffeb0b7ab015d1e94a7b3a1b226a004698 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
@@ -41,6 +41,8 @@
 #include <coreplugin/ifile.h>
 #include <utils/synchronousprocess.h>
 #include <utils/pathchooser.h>
+#include <qt4projectmanager/qtversionmanager.h>
+#include <qt4projectmanager/qt4projectmanagerconstants.h>
 
 #include <QFormLayout>
 #include <QComboBox>
@@ -94,20 +96,10 @@ void QmlProjectRunConfiguration::ctor()
     connect(em, SIGNAL(currentEditorChanged(Core::IEditor*)),
             this, SLOT(changeCurrentFile(Core::IEditor*)));
 
-    setDisplayName(tr("QML Viewer", "QMLRunConfiguration display name."));
+    Qt4ProjectManager::QtVersionManager *qtVersions = Qt4ProjectManager::QtVersionManager::instance();
+    connect(qtVersions, SIGNAL(qtVersionsChanged(QList<int>)), this, SLOT(updateEnabled()));
 
-    // prepend creator/bin dir to search path (only useful for special creator-qml package)
-    const QString searchPath = QCoreApplication::applicationDirPath()
-                               + Utils::SynchronousProcess::pathSeparator()
-                               + QString(qgetenv("PATH"));
-
-#ifdef Q_OS_MAC
-    const QString qmlViewerName = QLatin1String("QMLViewer");
-#else
-    const QString qmlViewerName = QLatin1String("qmlviewer");
-#endif
-
-    m_qmlViewerDefaultPath = Utils::SynchronousProcess::locateBinary(searchPath, qmlViewerName);
+    setDisplayName(tr("QML Viewer", "QMLRunConfiguration display name."));
 }
 
 QmlProjectRunConfiguration::~QmlProjectRunConfiguration()
@@ -128,7 +120,8 @@ QString QmlProjectRunConfiguration::viewerPath() const
 {
     if (!m_qmlViewerCustomPath.isEmpty())
         return m_qmlViewerCustomPath;
-    return m_qmlViewerDefaultPath;
+
+    return viewerDefaultPath();
 }
 
 QStringList QmlProjectRunConfiguration::viewerArguments() const
@@ -182,8 +175,11 @@ QWidget *QmlProjectRunConfiguration::createConfigurationWidget()
     Utils::PathChooser *qmlViewer = new Utils::PathChooser;
     qmlViewer->setExpectedKind(Utils::PathChooser::Command);
     qmlViewer->setPath(viewerPath());
+
     connect(qmlViewer, SIGNAL(changed(QString)), this, SLOT(onViewerChanged()));
 
+    QToolButton *qtVersionSelector = new QToolButton;
+
     QLineEdit *qmlViewerArgs = new QLineEdit;
     qmlViewerArgs->setText(m_qmlViewerArgs);
     connect(qmlViewerArgs, SIGNAL(textChanged(QString)), this, SLOT(onViewerArgsChanged()));
@@ -267,7 +263,7 @@ void QmlProjectRunConfiguration::setMainScript(const QString &scriptFile)
     } else {
         m_usingCurrentFile = false;
         m_mainScriptFilename = qmlTarget()->qmlProject()->projectDir().absoluteFilePath(scriptFile);
-        setEnabled(true);
+        updateEnabled();
     }
 }
 
@@ -315,40 +311,79 @@ bool QmlProjectRunConfiguration::fromMap(const QVariantMap &map)
     return RunConfiguration::fromMap(map);
 }
 
-void QmlProjectRunConfiguration::changeCurrentFile(Core::IEditor *editor)
+void QmlProjectRunConfiguration::changeCurrentFile(Core::IEditor * /*editor*/)
+{
+    updateEnabled();
+}
+
+void QmlProjectRunConfiguration::updateEnabled()
 {
+    bool qmlFileFound = false;
     if (m_usingCurrentFile) {
-        bool enable = false;
+        Core::IEditor *editor = Core::EditorManager::instance()->currentEditor();
         if (editor) {
             m_currentFileFilename = editor->file()->fileName();
             if (Core::ICore::instance()->mimeDatabase()->findByFile(mainScript()).type() == QLatin1String("application/x-qml"))
-                enable = true;
+                qmlFileFound = true;
         }
         if (!editor
             || Core::ICore::instance()->mimeDatabase()->findByFile(mainScript()).type() == QLatin1String("application/x-qmlproject")) {
             // find a qml file with lowercase filename. This is slow but only done in initialization/other border cases.
-            foreach(const QString& filename, m_projectTarget->qmlProject()->files()) {
+            foreach(const QString &filename, m_projectTarget->qmlProject()->files()) {
                 const QFileInfo fi(filename);
 
                 if (!filename.isEmpty() && fi.baseName()[0].isLower()
                     && Core::ICore::instance()->mimeDatabase()->findByFile(fi).type() == QLatin1String("application/x-qml"))
                 {
                     m_currentFileFilename = filename;
-                    enable = true;
+                    qmlFileFound = true;
                     break;
                 }
 
             }
         }
+    } else { // use default one
+        qmlFileFound = !m_mainScriptFilename.isEmpty();
+    }
+
+    bool newValue = QFileInfo(viewerPath()).exists() && qmlFileFound;
 
-        setEnabled(enable);
+    if (m_isEnabled != newValue) {
+        m_isEnabled = newValue;
+        emit isEnabledChanged(m_isEnabled);
     }
 }
 
-void QmlProjectRunConfiguration::setEnabled(bool value)
+QString QmlProjectRunConfiguration::viewerDefaultPath() const
 {
-    m_isEnabled = value;
-    emit isEnabledChanged(m_isEnabled);
+    QString path;
+
+    // prepend creator/bin dir to search path (only useful for special creator-qml package)
+    const QString searchPath = QCoreApplication::applicationDirPath()
+            + Utils::SynchronousProcess::pathSeparator()
+            + QString::fromLocal8Bit(qgetenv("PATH"));
+
+
+#ifdef Q_OS_MAC
+    const QString qmlViewerName = QLatin1String("QMLViewer");
+#else
+    const QString qmlViewerName = QLatin1String("qmlviewer");
+#endif
+
+    path = Utils::SynchronousProcess::locateBinary(searchPath, qmlViewerName);
+    if (!path.isEmpty())
+        return path;
+
+    // Try to locate default path in Qt Versions
+    Qt4ProjectManager::QtVersionManager *qtVersions = Qt4ProjectManager::QtVersionManager::instance();
+    foreach (Qt4ProjectManager::QtVersion *version, qtVersions->validVersions()) {
+        if (!version->qmlviewerCommand().isEmpty()
+                && version->supportsTargetId(Qt4ProjectManager::Constants::DESKTOP_TARGET_ID)) {
+            return version->qmlviewerCommand();
+        }
+    }
+
+    return path;
 }
 
 } // namespace QmlProjectManager
diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.h b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.h
index 1782046f9e93d52f93bb09e1dc352ff1830d922c..53adfb0cb6c8adea95886a35ee901e9b0c5852b4 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.h
+++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.h
@@ -88,18 +88,19 @@ public slots:
     void changeCurrentFile(Core::IEditor*);
 
 private slots:
-
     QString mainScript() const;
     void setMainScript(const QString &scriptFile);
     void updateFileComboBox();
 
+    void updateEnabled();
+
     void onViewerChanged();
     void onViewerArgsChanged();
     void onDebugServerAddressChanged();
     void onDebugServerPortChanged();
 
-
 protected:
+    QString viewerDefaultPath() const;
     QmlProjectRunConfiguration(Internal::QmlProjectTarget *parent, QmlProjectRunConfiguration *source);
     virtual bool fromMap(const QVariantMap &map);
     void setEnabled(bool value);
@@ -114,7 +115,6 @@ private:
 
     QString m_scriptFile;
     QString m_qmlViewerCustomPath;
-    QString m_qmlViewerDefaultPath;
     QString m_qmlViewerArgs;
     QmlProjectRunConfigurationDebugData m_debugData;
 
diff --git a/src/plugins/qt4projectmanager/qt4projectmanager.pro b/src/plugins/qt4projectmanager/qt4projectmanager.pro
index f4c492ac33b7189a631d9b4a1d4caa263de35912..28f45408b622d4cb64567a63e6ca376a303410f3 100644
--- a/src/plugins/qt4projectmanager/qt4projectmanager.pro
+++ b/src/plugins/qt4projectmanager/qt4projectmanager.pro
@@ -1,5 +1,6 @@
 TEMPLATE = lib
 TARGET = Qt4ProjectManager
+DEFINES +=  QT4PROJECTMANAGER_LIBRARY
 QT += network
 include(../../qtcreatorplugin.pri)
 include(qt4projectmanager_dependencies.pri)
@@ -44,7 +45,8 @@ HEADERS += qt4projectmanagerplugin.h \
     gettingstartedwelcomepage.h \
     qt4buildconfiguration.h \
     qt4target.h \
-    qmakeparser.h
+    qmakeparser.h \
+    qt4projectmanager_global.h
 SOURCES += qt4projectmanagerplugin.cpp \
     qt4projectmanager.cpp \
     qt4project.cpp \
diff --git a/src/plugins/qt4projectmanager/qt4projectmanager_global.h b/src/plugins/qt4projectmanager/qt4projectmanager_global.h
new file mode 100644
index 0000000000000000000000000000000000000000..54880b014c74aeb937db5de2f1a1e5e2d3a33803
--- /dev/null
+++ b/src/plugins/qt4projectmanager/qt4projectmanager_global.h
@@ -0,0 +1,41 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
+#ifndef QT4PROJECTMANAGER_GLOBAL_H
+#define QT4PROJECTMANAGER_GLOBAL_H
+
+#include <QtCore/qglobal.h>
+
+#if defined(QT4PROJECTMANAGER_LIBRARY)
+#  define QT4PROJECTMANAGER_EXPORT Q_DECL_EXPORT
+#else
+#  define QT4PROJECTMANAGER_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif // QT4PROJECTMANAGER_GLOBAL_H
diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp
index 7eae510d64fc873c6123d9d5814efa79916ee431..06b9d18ecdac8194566685244ae41673411fc75f 100644
--- a/src/plugins/qt4projectmanager/qtversionmanager.cpp
+++ b/src/plugins/qt4projectmanager/qtversionmanager.cpp
@@ -749,6 +749,7 @@ void QtVersion::setQMakeCommand(const QString& qmakeCommand)
 #endif
     m_designerCommand.clear();
     m_linguistCommand.clear();
+    m_qmlviewerCommand.clear();
     m_uicCommand.clear();
     m_toolChainUpToDate = false;
     // TODO do i need to optimize this?
@@ -1202,6 +1203,22 @@ QString QtVersion::linguistCommand() const
     return m_linguistCommand;
 }
 
+QString QtVersion::qmlviewerCommand() const
+{
+    if (!isValid())
+        return QString();
+    if (m_qmlviewerCommand.isNull()) {
+#ifdef Q_OS_MAC
+        const QString qmlViewerName = QLatin1String("QMLViewer");
+#else
+        const QString qmlViewerName = QLatin1String("qmlviewer");
+#endif
+
+        m_qmlviewerCommand = findQtBinary(possibleGuiBinaries(qmlViewerName));
+    }
+    return m_qmlviewerCommand;
+}
+
 bool QtVersion::supportsTargetId(const QString &id) const
 {
     updateToolChainAndMkspec();
diff --git a/src/plugins/qt4projectmanager/qtversionmanager.h b/src/plugins/qt4projectmanager/qtversionmanager.h
index 3716635d140be3150784d6c370676692aac837bf..fe4484ce3b891d87b040526bc38ac4ee74d97a6b 100644
--- a/src/plugins/qt4projectmanager/qtversionmanager.h
+++ b/src/plugins/qt4projectmanager/qtversionmanager.h
@@ -30,6 +30,7 @@
 #ifndef QTVERSIONMANAGER_H
 #define QTVERSIONMANAGER_H
 
+#include "qt4projectmanager_global.h"
 #include <projectexplorer/taskwindow.h>
 #include <projectexplorer/toolchain.h>
 #include <QSharedPointer>
@@ -45,7 +46,7 @@ class QtOptionsPageWidget;
 class QtOptionsPage;
 }
 
-class QtVersion
+class QT4PROJECTMANAGER_EXPORT QtVersion
 {
     friend class QtVersionManager;
 public:
@@ -70,6 +71,7 @@ public:
     QString uicCommand() const;
     QString designerCommand() const;
     QString linguistCommand() const;
+    QString qmlviewerCommand() const;
 
     bool supportsTargetId(const QString &id) const;
     QSet<QString> supportedTargetIds() const;
@@ -189,6 +191,7 @@ private:
     mutable QString m_uicCommand;
     mutable QString m_designerCommand;
     mutable QString m_linguistCommand;
+    mutable QString m_qmlviewerCommand;
     mutable QSet<QString> m_targetIds;
 };
 
@@ -199,7 +202,7 @@ struct QMakeAssignment
     QString value;
 };
 
-class QtVersionManager : public QObject
+class QT4PROJECTMANAGER_EXPORT QtVersionManager : public QObject
 {
     Q_OBJECT
     // for getUniqueId();