windeployqt module QtQuick not installed

5.4k Views Asked by At

Im trying to deploy a set of QT applications. On linux all applications works fine after installing all dependencies, but in windows QtQuick based applications doesn't work at all.

To deploy on windows I follow this steps:

  1. Compile my project in release mode.
  2. Add mingw to the system environment path
  3. Run windeployqt.exe --release c:\myappdir\relesase\myapp.exe

When step 3 is finish I got a lot of dlls in the release folder Qt5Quick.dll among them. But myapp.exe doesn't work and didn't threw any error. In order to get any extra information I add console to my CONFIG parameter under myapp.pro file and running myapp.exe by console I got this info:

QQmlApplicationEngine failed to load component
qrc:/main.qml:1 module "QtQuick" is not installed
qrc:/main.qml:-1 module "QtQuick" is not installed
qrc:/main.qml:1 module "QtQuick" is not installed

My version of QtSDK is 5.10.0 with MinGW so this solution doesn't work at all, I got more errors.

More over if I try to run myapp.exe without those dll in the root folder it works fine.

I been the whole day trying to find any solutions but nothing seems to work.

I'm pretty sure I missing something but I don't know whats is it. Thanks

1

There are 1 best solutions below

2
Engel On BEST ANSWER

As I suppose, I was missing something. --qmldir option is needed in order to add QtQuick modules.

windeployqt.exe --qmldir . --release c:\myappdir\relesase\myapp.exe

That line did the trick,

Thanks @frank osterfeld and @Felix