[Interest] Loading QML plugins without registered types
Oleg Shparber
trollixx at gmail.com
Sun Oct 19 21:15:18 CEST 2014
Hi,
I have a plugin which does not provide any QML types and needs only
initializeEngine() method to be executed. The problem is that the plugin is
not registered with QML Engine when it doesn't have any types. That leads
to an error with import statement:
qrc:/main.qml:4 module "com.wisetroll.nodeqml" is not installed
Right now I worked the problem around by registering a fake object:
qmlRegisterType<QObject>(uri, 1, 0, "__nodeQmlUselessObject");
I couldn't find any other way to make my plugin work. Am I missing a proper
way of loading plugins with no types?
If there's no other way, my suggestion would be to add a new directive to
qmldir, that would tell QML engine to keep register plugin regardless if it
provides types or not.
Best,
Oleg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20141019/67312a45/attachment.html>
More information about the Interest
mailing list