[SOLVED] Qml Deployment Problem
-
Hi!
I built static version of Qt 5.3.2 mingw 4.8, but qml application works only on developer`s computer.Running under Windbg on other computers gave this errors:
@QQmlApplicationEngine failed to load component
qrc:/main.qml:1 module "QtQuick" is not installed
qrc:/main.qml:2 module "QtQuick.Window" is not installed@What should I to do to solve it?
My .pro file:
@TEMPLATE = appQT += qml quick
QT += serialportSOURCES += main.cpp
../Bluetooth/bluetoothprovider.cpp
../Bluetooth/moduleprocess.cppRESOURCES += qml.qrc
Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =
Default rules for deployment.
include(deployment.pri)
HEADERS +=
../Bluetooth/bluetoothprovider.h
../Bluetooth/moduleprocess.h@And main.cpp:
@#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QtQml>#include "../Bluetooth/bluetoothprovider.h"
#include "../Bluetooth/moduleprocess.h"int main(int argc, char *argv[])
{qmlRegisterType<BluetoothProvider>("com.ivware16.components", 1, 0, "BluetoothProvider"); qmlRegisterType<ModuleProcess>("com.ivware16.components", 1, 0, "ModuleProcess"); QGuiApplication app(argc, argv); QQmlApplicationEngine engine; engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); return app.exec();
}@
-
Well, possible solution is
- Use QQuickView instead of QQmlApplicationEngine
- For static build create "QtQuick.2" dir with "qmldir" file and this content:
@module QtQuick
plugin qtquick2plugin
classname QtQuick2Plugin
typeinfo plugins.qmltypes@