I take everything back. The stupid Linux problem bit me that I cannot have two 
identical named 
.qrc files. All problems solved. :-)

Guido

On Fri, 1 Nov 2013 02:59:31 +0100
Guido Seifert <[email protected]> wrote:

> On Thu, 31 Oct 2013 09:33:42 -0700
> Alan Alpert <[email protected]> wrote:
> 
> > Add the qml files as a resource, then use
> > https://qt-project.org/doc/qt-5.1/qtqml/qqmlengine.html#qmlRegisterType-3
> > to register them into the plugin's module.
> 
> 
> Does not seem to work. At least not as easy as I hoped it would. I put qml 1 
> as resource 
> in my QQmlExtensionPlugin. I register it in registerTypes: 
> 
> void SpeedPlugin::registerTypes(const char *uri){
>       QUrl u("qrc:/SpeedQMLFiles/SpeedMain.qml");
>       qmlRegisterType(u, uri, 1, 0, "Speed");
> }
> 
> This _seems_ to work. I can load the plugin using the PluginLoader. I can 
> call register and with
> QML_IMPORT_TRACE=1 it looks like my qml is correctly registered.
> 
> Unfortunately I cannot use it. When I import Speed into qml 2, I get:
> qrc:/SpeedQMLFiles/SpeedMain.qml: File not found
> 
> The 'main' qml cannot access the resources of my plugin. Ok, not too 
> surprising. It
> was worth a try.
> 
> Guido
> 
> _______________________________________________
> Interest mailing list
> [email protected]
> http://lists.qt-project.org/mailman/listinfo/interest
> 
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to