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; engine.load(QUrl(QStringLiteral("qrc:///main.qml"))); return app.exec();
}
@
And .pro file:
@
TEMPLATE = appQT += qml quick widgets
SOURCES += main.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)
@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:
"http://qt-project.org/forums/viewthread/42559/":http://qt-project.org/forums/viewthread/42559/