Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    [SOLVED] Qml Deployment Problem

    QML and Qt Quick
    1
    2
    1639
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      ExorcistInc last edited by

      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 = app

      QT += qml quick
      QT += serialport

      SOURCES += main.cpp
      ../Bluetooth/bluetoothprovider.cpp
      ../Bluetooth/moduleprocess.cpp

      RESOURCES += 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&#40;&#41;;
      

      }@

      1 Reply Last reply Reply Quote 0
      • E
        ExorcistInc last edited by

        Well, possible solution is

        1. Use QQuickView instead of QQmlApplicationEngine
        2. For static build create "QtQuick.2" dir with "qmldir" file and this content:
          @module QtQuick
          plugin qtquick2plugin
          classname QtQuick2Plugin
          typeinfo plugins.qmltypes@
        1 Reply Last reply Reply Quote 0
        • First post
          Last post