diff --git a/src/plugins/qmlprojectmanager/qmlproject.cpp b/src/plugins/qmlprojectmanager/qmlproject.cpp index 5bd88c8bdde778a4e888da1f7c48be348634e5f0..edfb45a9859beeeda65fac832d0c5bc944f3729b 100644 --- a/src/plugins/qmlprojectmanager/qmlproject.cpp +++ b/src/plugins/qmlprojectmanager/qmlproject.cpp @@ -308,11 +308,11 @@ QmlRunConfiguration::QmlRunConfiguration(QmlProject *pro) { setDisplayName(tr("QML Viewer")); - // append creator/bin dir to search path (only useful for special creator-qml package) - const QString searchPath = QString(qgetenv("PATH")) + // prepend creator/bin dir to search path (only useful for special creator-qml package) + const QString searchPath = QCoreApplication::applicationDirPath() + Utils::SynchronousProcess::pathSeparator() - + QCoreApplication::applicationDirPath() -; + + QString(qgetenv("PATH")); + m_qmlViewerDefaultPath = Utils::SynchronousProcess::locateBinary(searchPath, QLatin1String("qmlviewer")); }