Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [SOLVED] Qml Deployment Problem
QtWS25 Last Chance

[SOLVED] Qml Deployment Problem

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 1 Posters 1.8k Views
  • 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 Offline
    E Offline
    ExorcistInc
    wrote on last edited by
    #1

    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
    0
    • E Offline
      E Offline
      ExorcistInc
      wrote on last edited by
      #2

      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
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved