Use QtPlugin for dynamical load QML files
Hello! I need to dynamically load QML files in my application. But I need that these files are stored in dynamical libraries. How I can load plugins in my C++ application by using qpluginloader, and use QML files stored in libraries? Thanks.
Well, I'm paraphrasing. How can I integrate QML files into my application, that they were not just files with the code on the disk?
If it is about just loading files consider using a "binary resource file":http://doc.qt.nokia.com/latest/resources.html#external-binary-resources.
If you want to provide code too, compile the resources into a "shared library":http://doc.qt.nokia.com/latest/resources.html#compiled-in-resources. Be aware that you might need to "initialize":http://doc.qt.nokia.com/latest/qdir.html#Q_INIT_RESOURCE and "cleanup":http://doc.qt.nokia.com/latest/qdir.html#Q_CLEANUP_RESOURCE your resources then. If you want to intergrate your code or resources directly to the declarative engine see "Extending QML using Qt C++":http://doc.qt.nokia.com/latest/gettingstartedqml.html#extending-qml-using-qt-c.