You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A repository to test and demonstrate different project structures
where there is an application that has a QML module and using other external QML modules.
Motivation
Although the the official Qt documentation states that dynamic linking is possible,
the examples and other resources available on the internet mostly seem to prefer
static linking of QML modules into the application binary.
See the resources chapter for links to other examples and documentation on this topic.
Examples
Static Linking Example
In this example the module is statically linked into the App binary
via the module's plugin library. The project has a "standard" directory
structure that matches the QML module URIs relative to the root folder
of the example. For example: the ModuleA has the URI Modules.ModuleA
so it is located in the StaticLinkingExample\Modules\ModuleA folder.
Dynamic Linking Example
In this example the module is dynamically linked into the App binary
via the module's backing library. The project has a "standard" directory
structure that matches the QML module URIs relative to the root folder
of the example. For example: the ModuleA has the URI Modules.ModuleA
so it is located in the DynamicLinkingExample\Modules\ModuleA folder.
Dynamic Linking Custom Structure Example
In this example the module is dynamically linked into the App binary
via the module's backing library. The project has a "custom" directory
structure that does not match the QML module URIs relative to the root
folder of the example. For example: the ModuleA has the URI
Modules.ModuleA but it is located in the
DynamicLinkingCustomStructureExample\sources\Modules\ModuleA folder.
Dynamic Linking Custom Structure Modern Example
In this example the module is dynamically linked into the App binary
via the module's backing library. The project has a "custom" directory
structure that does not match the QML module URIs relative to the root
folder of the example. For example: the ModuleA has the URI
Modules.ModuleA but it is located in the
DynamicLinkingCustomStructureModernExample\sources\Modules\ModuleA folder.
The difference between this and the non-modern example is, that here the
module dependencies are declared via the DEPENDENCIES TARGET which helps
the toolchain finding them.