Can't use QtQuick.Controls in static builds on windows #292
Replies: 2 comments
-
Beta Was this translation helpful? Give feedback.
-
Solved this problem by copying the qml dir under the qt installation folder to my project folder, and added all the files except the .lib and .obj files under the qml using the qrc! macro like this:
I don't know if there is a better solution. I also tried to statically build the official coffee example and a newly created minimal example in QtCreator and it worked just fine. I did not import any plugins. The QtCreator must've done something for me automatically somewhere that I can't see, so that the qml modules are found under the qrc:/qt-project.org/imports path in runtime. |
Beta Was this translation helpful? Give feedback.
-
First I built Qt statically from source and add the location where qmake lives in to the system path. Then I cloned this repo locally and made a few modifications:
An finally I'm able to build and run a simple qml app statically. But when I try to import QtQuick.Controls and use types such as a simple Button, the application fails with the following log:
These are all the plugins that I imported.
It's so strange that QtQuick.Layouts works fine but not QtQuick.Controls. I'm guessing there must be somthing wrong with the import of QtQuick.Controls, so I tried setting QML_IMPORT_TRACE=1 as suggested in https://doc.qt.io/qt-6/qtquick-debugging.html but had no output infomation regarding the qml module imports. Can anybody help me with this, please?
Beta Was this translation helpful? Give feedback.
All reactions