[Qt-qml] Loading QML plugin from the resource system

Sampo Savola samposav at mail.student.oulu.fi
Wed Jan 19 20:00:22 CET 2011


Hello

I have an Qt application where I have resource system in use  and I  
have added my main.qml to it.

In my main.cpp I load main.qml like this:

QDeclarativeView view;
view.setSource(QUrl("qrc:/main.qml"));

This works OK, but I would like to load QML plugin from my main.qml file.
Is it possible to include QML plugin in Qt's resource system?
If it is possible how should it be loaded from .qml file that is in  
Qt's resource system and how QML plugin should be added to Qt Resource  
system?

Thanks
Sampo



More information about the Qt-qml mailing list