Windows - qt_add_qml_module failed to load the plugin
-
Hi All
Unable to load the plugin created using qt_add_qml_module
CMake on Windows , Qt 6.6.3, Mingw_64.
Creating the library & adding new qml module using
qt_add_qml_module(..)This creates the plugin.
However when I import in QML, it is unable to load the plugin.
I tried to load the plugin using QPluginLoader. This also fails.Same CMake configuration works on Linux without any change.
Anyone facing similar issue ?
-
Here is the answer - qt_add_qml_module builds plugin & one shared library. Both have to be in path. I tried to add the path using the addLibraryPath. Adding the path using addLibraryPath did not help. Finally I modified the path environment variable. It started working.
- May be bug with addLibraryPath. Need to file a bug on this.
- add the path of the shared library & plugin to environment variable. It works.
-
D dheerendra has marked this topic as solved on