Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

[Closed double post] How to deploy qml application on machine (Windows XP) without QtSDK



  • 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;&#41;;
    viewer.showExpanded(&#41;;
    
    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?



  • welcome to devnet

    There is no need to publish the same thread twice. When you have published in a wrong forum, it may be moved by one of the moderators.

    So please do not double post.

    Closing this thread.


Log in to reply