[Qt-qml] Packaging and deploying QML in a modular application

Alex alexlordax+qt at gmail.com
Thu Jan 6 23:21:18 CET 2011


Hi all,

I have a C++-based container application that is installed
independently of any QML content.  This application has some baseline
functionality and can be used by itself.  Additionally, there is a
variety of QML-based content modules that can be independently
installed by the user.

During development I have something like the following structure:

    modules/module1/
    modules/module2/
    modules/module3/
    modules/common/

Each module directory contains a bunch of images, audio, and QML files
(~ 500MB per module).  An entry-point QML file (e.g., main.qml) exists
in each module.  The 'common' directory contains QML components
imported by the QML files in the modules, along with some shared
assets.

So, my question is to how to best package and deploy these modules
individually?

For example:

    module1.pkg
    module2.pkg
    module3.pkg

What I want to happen is for my container application to detect and
load the modules in run-time (e.g., from some well-defined filesystem
location) and then iterate their assets and display QML views on
demand.

The resource system comes to mind, but I have some concerns:

1. Is it even possible to create a 500MB .qrc file?
2. Is it possible to load that .qrc file into my container application
at runtime?
3. Is it possible to add a QML import path as a resource path (e.g.,
":/common")?

To complicate matters further, the QML code in my modules imports
common QML components that will probably be packaged and deployed
separately...  One thought here is to bundle the common directory
directly into each module package.

Any thoughts?

Cheers,
Alex


More information about the Qt-qml mailing list