diff options
author | wang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com> | 2018-12-03 12:50:55 +0800 |
---|---|---|
committer | wang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com> | 2018-12-03 12:52:47 +0800 |
commit | 5e11084733c184b0505a4f4816e69b0dd363b653 (patch) | |
tree | dd267644470ecfc8676ab31baae315fc7a3c8fb8 /sample/app/main.cpp | |
parent | 5ba4327b148f81852c6e2a53bc51ab07b238602e (diff) |
change qml folder to
Diffstat (limited to 'sample/app/main.cpp')
-rw-r--r-- | sample/app/main.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/sample/app/main.cpp b/sample/app/main.cpp index 69642dc..399a5c9 100644 --- a/sample/app/main.cpp +++ b/sample/app/main.cpp @@ -21,7 +21,6 @@ #include <QtQml/QQmlApplicationEngine> #include <QtQuickControls2/QQuickStyle> #include <QtQuick/QQuickWindow> -#include <QtCore/QDir> #include "eventhandler.h" @@ -57,18 +56,12 @@ int main(int argc, char *argv[]) EventHandler *eventHandler = new EventHandler(); eventHandler->init(port, secret.toStdString().c_str()); engine.rootContext()->setContextProperty("eventHandler", eventHandler); - QString qmldir = QCoreApplication::applicationDirPath(); - qmldir.replace(QString("bin"), QString("qml")); - qmldir.append('/'); - qDebug() << "####qmldir=" << qmldir; - engine.rootContext()->setContextProperty("qmldir", qmldir); engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); if (engine.rootObjects().isEmpty()) { HMI_DEBUG(APP_ID, "Fatal Error, rootObject is empty!"); return -1; } - qDebug() << "####" << QDir::currentPath() << QCoreApplication::applicationDirPath(); QObject *root = engine.rootObjects().first(); QQuickWindow *window = qobject_cast<QQuickWindow *>(root); |