QT failed to load components
-
The app runs fine in QT Creator but when i try to use windeployqt, it doesn't run and shows nothing.
So i try to run the deployed version in my QT Creator and it throws these errors
QQmlApplicationEngine failed to load component qrc:/mvc.qml:4:1: module "QtQuick.Layouts" is not installed qrc:/mvc.qml:3:1: module "QtQuick.Controls" is not installed qrc:/mvc.qml:2:1: module "QtQuick.Window" is not installed qrc:/mvc.qml:1:1: module "QtQuick" is not installed qrc:/mvc.qml:4:1: module "QtQuick.Layouts" is not installed qrc:/mvc.qml:3:1: module "QtQuick.Controls" is not installed qrc:/mvc.qml:2:1: module "QtQuick.Window" is not installed qrc:/mvc.qml:1:1: module "QtQuick" is not installed qrc:/mvc.qml:4:1: module "QtQuick.Layouts" is not installed qrc:/mvc.qml:3:1: module "QtQuick.Controls" is not installed qrc:/mvc.qml:2:1: module "QtQuick.Window" is not installed qrc:/mvc.qml:1:1: module "QtQuick" is not installed qrc:/mvc.qml:4:1: module "QtQuick.Layouts" is not installed qrc:/mvc.qml:3:1: module "QtQuick.Controls" is not installed qrc:/mvc.qml:2:1: module "QtQuick.Window" is not installed qrc:/mvc.qml:1:1: module "QtQuick" is not installed
Here is the output of windeployqt
Adding Qt6Svg for qsvgicon.dll Direct dependencies: Qt6Core Qt6Gui Qt6Network Qt6Qml All dependencies : Qt6Core Qt6Gui Qt6Network Qt6Qml To be deployed : Qt6Core Qt6Gui Qt6Network Qt6Qml Qt6Svg Updating Qt6Core.dll. Updating Qt6Gui.dll. Updating Qt6Network.dll. Updating Qt6Qml.dll. Updating Qt6Svg.dll. Updating opengl32sw.dll. Updating D3Dcompiler_47.dll. Updating libgcc_s_seh-1.dll. Updating libstdc++-6.dll. Updating libwinpthread-1.dll. Creating directory C:/Users/john/Desktop/Projects/QT projects/build-untitled6-Desktop_Qt_6_0_4_MinGW_64_bit-Release/release/iconengines. Updating qsvgicon.dll. Creating directory C:/Users/john/Desktop/Projects/QT projects/build-untitled6-Desktop_Qt_6_0_4_MinGW_64_bit-Release/release/imageformats. Updating qgif.dll. Updating qico.dll. Updating qjpeg.dll. Updating qsvg.dll. Creating directory C:/Users/john/Desktop/Projects/QT projects/build-untitled6-Desktop_Qt_6_0_4_MinGW_64_bit-Release/release/platforms. Updating qwindows.dll. Creating C:\Users\john\Desktop\Projects\QT projects\build-untitled6-Desktop_Qt_6_0_4_MinGW_64_bit-Release\release\translations... Creating qt_ar.qm... Creating qt_bg.qm... Creating qt_ca.qm... Creating qt_cs.qm... Creating qt_da.qm... Creating qt_de.qm... Creating qt_en.qm... Creating qt_es.qm... Creating qt_fa.qm... Creating qt_fi.qm... Creating qt_fr.qm... Creating qt_gd.qm... Creating qt_he.qm... Creating qt_hr.qm... Creating qt_hu.qm... Creating qt_it.qm... Creating qt_ja.qm... Creating qt_ko.qm... Creating qt_lv.qm... Creating qt_nl.qm... Creating qt_nn.qm... Creating qt_pl.qm... Creating qt_pt_BR.qm... Creating qt_ru.qm... Creating qt_sk.qm... Creating qt_tr.qm... Creating qt_uk.qm... Creating qt_zh_CN.qm... Creating qt_zh_TW.qm...
If i don't use windelpoyqt, it runs fine.
-
Thanks for the suggestion. I've tried using the following:
windeployqt --qmldir <location of qml folder> <location of exe>
Now the project runs but the GUI only shows the main windows, Other components are not showing
When i run the executable on the build machine, it works but on other machines it shows empty windows just as above
-
@pingal Do this: open a terminal, set QT_DEBUG_PLUGINS variable ("set QT_DEBUG_PLUGINS=1") and then start your app from that terminal. Check the output in the terminal (post it here). See https://doc.qt.io/qt-5/debug.html for details.
-
set QT_DEBUG_PLUGINS=1 myProj.exe
It executes the program but doesn't output anything on terminal (on both machines i.e. build and deployed)
The only difference is that on build machines, it shows buttons and other components but on other machines it just shows a blank window as posted in the above post