[Interest] (Q)Plugins and QML/Quick
ulf.hermann at qt.io
Wed Sep 15 08:06:48 CEST 2021
> But my goal is to not know about the types beforehand at all. It's
> basically the "copy the dll to the application folder and it'll
> magically show up as an option" pattern. The goal is to provide an
> extensibility framework, like eclipse, or web browser addons. Not just
> using a type defined elsewhere.
There is Loader . You can define some convention on where the entry
point to a module is to be found, and construct a URL for Loader out of
that. Then you can scan the relevant QML import paths and record the
available modules. The result can be presented as a menu.
Mind that loading a QML file directly from the host file system prevents
you from using the pre-compiled byte code in the plugin. Therefore, the
entry points should probably only do a named import of their module and
instantiate some other type made available that way.
More information about the Interest