Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[SOLVED] Loading pure QML plugin from shared library and Qt Creator
trollixx last edited by
I want some QML components (pure QML, no C++) to reside in Qt plugin library. QML files are embedded inside qrc, but then I got a trouble loading them as QML module.
For example, I have some components in com.mycompany.coolcomponents module described in corresponding qmldir file. The path to qmldir is :/components/com/mycompany/coolcomponents/qmldir. I added this path to QML import paths:
But importing my module in QML doesn't work.
import com.mycompany.coolcomponents 1.0
I cannot figure out what I'm doing wrong, any ideas?
Thanks in advance.
UPDATE: The first problem is solved (removed plugin directive from qmldir), but now Qt Creator doesn't see my components' info (no autocomplete, etc), is there any way to make it parse QMLs from plugin?
UPDATE 2: Fixed with QML_IMPORT_PATH variable.
DRAX last edited by
This is little old post, but can you please give some code example how did you made it?