QML project can't be run by Static Qt linking version , Qt 5.2
-
Hello and welcome to qt-project.org,
i've got no solution, but could it be that you have to add qtquick as a flag when making qt?
-
Well it was only a guess but i'll see what i can find. Your pro file looks alright so far.
-- Update --
I couldn't find a flag for quick nor for qml.
bq. I had similar problem when building Qt5 for iOS. The issue is related to qml import path. It includes hardcoded path to qtbase/import even when Qt is built with option "-static". When the applications starts, qml engine tries to import plugins from the Qt's directory, detects qmldir and complains of missing qtquick2plugin.
A fix would be:
bq. Easy workaround is to clear the import path list in the app main:
viewer.engine()->setImportPathList(QStringList());
Of course still you have to initialize plugin manually:
qobject_cast<QQmlExtensionPlugin*>(qt_static_plugin_QtQuick2Plugin().instance())->registerTypes("QtQuick");Have you already tried this?
-
Thank you,
I tried it only now:
My code is:@ QtQuick2ApplicationViewer viewer;
viewer.engine()->setImportPathList(QStringList()); qobject_cast<QQmlExtensionPlugin*>(qt_static_plugin_QtQuick2Plugin().instance())->registerTypes("QtQuick"); viewer.setMainQmlFile(QStringLiteral("qml/untitled1/main.qml")); viewer.showExpanded();
@
but still I have same error:
error: Unknown module(s) in QT: quick qmlwhen I try to build with built in desktop kit, i faced some problems with this code.
I don't know, Should I change any this in this code before use ?
-
Have a look at:
"Installer Tutorial":http://doc-snapshot.qt-project.org/qtifw-1.3/ifw-tutorial.html
"Deploy On Android Devices":http://doc.qt.digia.com/qtcreator/creator-deployment-maemo.html -
Sir, help me to understand.
First, I dont need installer. But, app .exe file which work in any place without depending on any other files. Like .apk for Android from Eclipse or .ipa from xcode for IOS.
Now, I feel that I got very confused.
Can you help me to know the real problem ?All what I need is this Stand-Alone exe file of project.
The .exe file in "Release" folder doesn't work for QML projects.And I have this error:
!E:\Qt\q.png()!When I searched, some said that I have to create static run version of qt to get this Stand-Alone exe file. But I see now that may that is very wrong.
What is your opinion ?
Sorry, for disturbance
-
Sorry, error is
- The procedure entry point _Z8qWinMainP11HINSTANCE__S0_PciRiR7QVectorIS1_E could not be located in the dynamic link library E:\Qt\build-untitled1-Desktop_Qt_5_2_0_MinGW_32bit-Release\release\untitled1.exe
I searched about it, and some say some missing dlls, but nothing i found after installing all missing dlls.
-
The second link i posted is about deploying applications on android devices, i guess that means .apk. About the error: You'll find all necessary DLL's in:
PATH_TO_YOUR_QT\YOUR_QT_VERSION\YOUR_COMPILER\bin*.dll
for example:
C:\Qt\5.2.1\mingw48_32\bin*.dll
Don't forget to check for dependencies.
-
I built qt staticaly.
Qt widgets applications works on my static kit. But qt quick applications doesn't work!
Then i tried to run default qt quick "hello world" on static kit and i failed to push run button because it was disabled. This program is working on normal kit.
In qt versions window when choosing my static qt i see warning sign and "No qmlscene installed" and "No qmlviewer installed".
In General Message window i see "Project ERROR: Unknown module(s) in QT: quick qml".
In static configuration "Run" button is disabled and onMouseHover it shows tooltip: ".pro file coudn't be parsed".pro file is default:
@
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)
@