qml caching problem
-
I'm facing for the first time a weird problem. I added to my project a new resource file, called qml. Here how my pro file looks like:
QT += core gui widgets sql serialbus svg network printsupport qml quickwidgets quick TARGET = MyProject TEMPLATE = app DESTDIR = bin CONFIG += c++11 DEFINES += QT_DEPRECATED_WARNINGS SOURCES += \ main.cpp \ mainwindow.cpp \ ... HEADERS += \ mainwindow.h \ ... FORMS += \ mainwindow.ui \ ... TRANSLATIONS = languages/translation_en.ts languages/translation_it.ts RESOURCES += \ qdarkstyle/style.qrc \ resources.qrc \ qml.qrc
when I'm in debug mode, I see all the three resource files with all their contents. But when I switch to the release mode the qml.qrc file disappear, a new qml_qmlcache.qrc is shown. This contains a different file that is not available (?) and cannot be removed. I tried to clean, run qmake and rebuild but the behavior doesn't change.
What can be trigger such a behavior? How to fix it?
-
Hi,
What if you change that .qrc file name to something else ?
-
-
Might be the QtQuick compiler kicking in.
-
@SGaist said in qml caching problem:
Might be the QtQuick compiler kicking in.
mmm, I didn't add
qtquickcompiler
toCONFIG
. Would you please explain a bit more what should I do to avoid that? -
Check the content of the CONFIG variable and try
CONFIG -= qtquickcompiler
-
@SGaist said in qml caching problem:
Check the content of the CONFIG variable and try
CONFIG -= qtquickcompiler
Ok, I didn't understand from the docs that the option is enabled by default!
After disabling it, it created a new qml_qmlcache.qrc file (without override the original) and it seems to work in both debug and release mode.