Qt World Summit: Submit your Presentation

How to add a module with a plugin to resource file

  • Hi everyone, I am new in the forum and I have a problem to porting my application to android. I read on several topics that the main work to do is to add everything your application needs to the qrc file, so that all your dependencies will be compiled into the application executable. I am having trouble with one of my plugins. This is how my files look:


    <qresource prefix="/">

    qmldir file
    module MyModule
    MyItem 1.0 MyItem.qml
    plugin MyPlugin

    import MyModule 1.0


    and this is my project directory
    |---------- > myproject.pro
    |---------- > main.cpp
    |---------- > Resources
    ------------|----------- > qml.qrc
    ------------|----------- > MyModule

    The problem is that when i run my application the build goes fine, the application loads the module but not the plugin.
    qrc:/main.qml:6 module "MyModule" plugin "MyPlugin" not found

    The most wired thing is that if I change
    the application detects the plugin and works perfectly. Any idea to solve my problem to to help me?

    Thanks in advance.