⚠️ Forum Maintenance: Feb 6th, 8am - 14pm (UTC+2)

Qt 5.3 qml static linking

  • Hi all.
    Help please.
    I am a beginner of Qt. I want to build a qml ui statically . I read the artical how to build qt statically . Every thing is ok if i donot use qml in the sourse file .

    When i build my source file statically using qml that does not work !! shows errors !! what should i do now !! This is my code bellow.
    #include <QApplication>
    #include <QQmlApplicationEngine>

    int main(int argc, char *argv[])
    QApplication app(argc, argv);

    QQmlApplicationEngine engine;
    return app.exec();

    And .pro file:
    TEMPLATE = app

    QT += qml quick widgets

    SOURCES += main.cpp

    RESOURCES += qml.qrc

    Additional import path used to resolve QML modules in Qt Creator's code model


    Default rules for deployment.


    The error is:
    Project ERROR: Unknown module(s) in QT: quick qml

  • I had the same problem a while ago, but with Qt 5.2.1

    I managed to solve it by installing Python and adding a reference to it in the PATH variable, since I've read somewhere that those modules require Python to be built.

    You can find my follow up post here:

Log in to reply