Exporting QML files as Library - CMake
-
Hello everybody. I need to "export" all theQML files of my project into a library file that could be loaded from another project using the same URI to load a file. Searching on the web, I've found that this could be do with "Modules" so I've created one.
I linked the generated library to my new project but when I try to open a qml file I get this error:
"file:///ExtraModule/RootWindow.qml: No such file or directory""ExtraModule" is the URI of the Module with "RESOURCE_PREFIX /".
"RootWindow.qml" is a qml file :DSo, it's like it can't find the file also if the library is correctly linked.
This is the definition of the module:qt_add_qml_module(extra_module URI "ExtraModule" VERSION 1.0 OUTPUT_DIRECTORY ../../ExtraModule RESOURCE_PREFIX / QML_FILES RootWindow.qml . . . . andSoOn.qml)
EDIT: problem was about module plugin.
Link that helped me: CLICK