Important: Please read the Qt Code of Conduct -

How to enumerate/reference extensions imported into the QQmlApplicationEngine?

  • I have successfully created a multi-platform host application that can dynamically load plugins derived from QQmlPluginExtension via QQmlApplicationEngine::importPlugin() on Windows, Android, Linux, OSX (iOS will require static linking.)

    I don't know what extensions will be installed until runtime, as this is an extension mechanism for customers to add their own plugins without rebuilding the host application. This means I need to load all plugins found in a series of folders/sub-folders.

    My goal is provide a base window for these plugins to render themselves into, so I need to enumerate the imported extensions in order, presumably, to dynamically create their associated QML types.

    Any idea how to do this? There seems to be no obvious way to query the QQmlEngine for this information.

    For example, if my application loads a single discovered plugin, which happens to be be a custom QML extension containing a Web View QML component, - how do I find/create this previously unknown QML extension object after the QQmlEngine has imported it?

    Is this the wrong approach? Should I be loading it as a regular extension, enumerating it in some fashion via that plugin loader instance and then registering it as a Qml type on my own?


  • ...crickets?

Log in to reply