Working example using ENABLE_TYPE_COMPILER
-
Hi all
I moved my android app from qt 5 to new version6 but I'm still unable to compile the qml files into c++. Based to the documentation is required to add the ENABLE_TYPE_COMPILER to qt_add_qml_module() but it doesn't compile. One of the error is :
Error: QtQuick.Controls uses optional imports which are not supported. Some types might not be found
Explanation for this error is here but solution proposed doesn't work for me and I receive always the same error. I can not find a working example using this flag (I'm compiling for android). Someone can link me to some example around (if exist)?
Thank you -
Same error here, using qt 6.5.2, also tested with qt 6.5.1
the qt_add_qml_module in cmake:
qt_add_qml_module(appThings URI Things RESOURCE_PREFIX / VERSION 1.0 NO_PLUGIN DEPENDENCIES QtQuick IMPORTS ${QUICK_CONTROLS} # same as in given source SOURCES ... QML_FILES ... RESOURCES ... ENABLE_TYPE_COMPILER ) -
Same here, not working. Trying to do it based on this article: https://www.qt.io/blog/compiling-qml-to-c-qtquick-controls-and-optional-imports
-
Apparently this has something to do with QtQuick.Controls dynamically loading styles as runtime. See this post:
https://www.qt.io/blog/compiling-qml-to-c-qtquick-controls-and-optional-imports