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. How to deploy qml application on machine (Windows XP) without QtSDK
Qt 6.11 is out! See what's new in the release blog

How to deploy qml application on machine (Windows XP) without QtSDK

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 4.9k Views 1 Watching
  • 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.
  • M Offline
    M Offline
    Mapple
    wrote on last edited by
    #1

    I created small test qml project. I have small main.qml file:

    @import QtQuick 1.0
    import com.nokia.symbian 1.0

    Rectangle {
    id: main
    width: 320
    height: 480
    color: "orange"

    Button
    {
        text: "click"
    }
    

    }
    @

    I add next line in my QMLTest.pro file:

    @QML_IMPORT_PATH = C:\QtSDK\Desktop\Qt\4.7.4\msvc2008\imports@

    main.cpp file looks like this:

    @#include <QtGui/QApplication>
    #include "qmlapplicationviewer.h"

    Q_DECL_EXPORT int main(int argc, char *argv[])
    {
    QScopedPointer<QApplication> app(createApplication(argc, argv));

    QmlApplicationViewer viewer;
    
    viewer.addImportPath("C:\\QtSDK\\Desktop\\Qt\\4.7.4\\msvc2008\\imports");
    viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
    viewer.setMainQmlFile&#40;QLatin1String("qml/QMLTest/main.qml"&#41;);
    viewer.showExpanded();
    
    return app->exec&#40;&#41;;
    

    }@

    The structure of catalog looks like:

    @QMLTest
    |
    ----QMLTest.exe
    |
    ----qml
    |
    ----QMLTest
    |
    ----main.qml@

    When I launched the QMLTest.exe on my developing machine, I saw a button on an orange background.
    Then I made next actions:

    comment next line in main.cpp:

    // viewer.addImportPath("C:\QtSDK\Desktop\Qt\4.7.4\msvc2008\imports");

    comment next line in QMLTest.pro file:

    #QML_IMPORT_PATH = C:\QtSDK\Desktop\Qt\4.7.4\msvc2008\imports

    copy folder "com" from C:\QtSDK\Desktop\Qt\4.7.4\msvc2008\imports to "QMLTest/qml/QMLTest" folder

    The structure of catalog looks like:

    @QMLTest
    |
    ----QMLTest.exe
    |
    ----qml
    |
    ----QMLTest
    |
    ----main.qml
    |
    ----com
    |
    ----nokia
    |
    ----symbian
    |
    ----Button.qml and others@

    When I launched the QMLTest.exe on my developing machine, I saw a button on an orange background.

    I add QtCore4.dll, QtDeclarative4.dll, QtGui4.dll, QtNetwork4.dll, QtScript4.dll, QtSql4.dll, QtXmlPatterns4.dll
    The structure of catalog on virtual machine looks like:

    @QMLTest
    |
    ----QMLTest.exe
    |
    ----QtCore4.dll, QtDeclarative4.dll, QtGui4.dll, QtNetwork4.dll, QtScript4.dll, QtSql4.dll, QtXmlPatterns4.dll
    |
    ----qml
    |
    ----QMLTest
    |
    ----main.qml
    |
    ----com
    |
    ----nokia
    |
    ----symbian
    |
    ----Button.qml and others@

    When I launched the QMLTest.exe on virtual machine (windows XP), I saw white window without button.
    I copy qmlviewer.exe and QtOpenGL4.dll from C:\QtSDK\Desktop\Qt\4.8.0\msvc2010\bin (developing machine) to QMLTest folder

    on virtual machine. Then I add QML_IMPORT_TRACE enviroment variable with value 1 and run qmlviewer:

    ...
    QDeclarativeImports(file:///C:/QMLTest/qml/QMLTest/main.qml)::addImport: "." -1.-1 File as ""
    QDeclarativeImports(file:///C:/QMLTest/qml/QMLTest/main.qml)::addImport: "QtQuick" 1.0 Library as ""
    QDeclarativeImports(file:///C:/QMLTest/qml/QMLTest/main.qml)::addImport: "com/nokia/symbian" -1.-1 File as ""
    QDeclarativeImportDatabase::importPlugin: "qml.QMLTest.com.nokia.symbian" from

    "C:/QMLTest/qml/QMLTest/com/nokia/symbian/symbianplugin_1_0.dll"
    file:///C:/QMLTest/qml/QMLTest/main.qml:3:1: plugin cannot be loaded for module "qml.QMLTest.com.nokia.symbian": Cannot load

    library C:/QMLTest/qml/QMLTest/com/nokia/symbian/symbianplugin_1_0.dll: ?? ?????? ????????? ??????.
    import "com/nokia/symbian"

    Any ideas?

    1 Reply Last reply
    0
    • F Offline
      F Offline
      favoritas37
      wrote on last edited by
      #2

      The sure thing is that you try to use the Symbian Components at an application that targets Desktop (Windows). It sounds enough for me. You have to find an other plugin that will replace the Symbian components that you try to use or you have to create them by your own. A project that i know of that you can use is "Qt Quick Colibri":https://projects.developer.nokia.com/colibri .

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Mapple
        wrote on last edited by
        #3

        It's working on developing machine (Windows 7). Thanks for the Colibri project. I didn't know about it.

        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