[Interest] Getting at the metadata (or simply the file names) of currently loaded plugins

Konstantin Tokarev annulen at yandex.ru
Thu Dec 28 19:34:28 CET 2017



28.12.2017, 21:16, "René J. V. Bertin" <rjvbertin at gmail.com>:
> Thiago Macieira wrote:
>
>>>  Which also explains why the built-in styles don't show up because they're in
>>>  a shared library?
>>
>>  Those would also be staticplugins. If they are compiled into a library or the
>>  executable, as opposed to a dynamically-loaded module, they're staticplugins.
>
> Hmm, so the staticplugins list should contain the fusion, windows and macintosh
> styles, but as I said it was empty. Curious but not a priority ATM.

You probably have to initialize them with Q_IMPORT_PLUGIN macro

>
>>>  I'm a bit surprised though that this is so difficult. Plugin metadata is a
>>>  special case of QObject metadata, no? I can't find any methods to query that
>>>  information (except via QPluginLoader for plugins), why is that?
>>
>>  No. It's a special section in the executable so that QLibrary can find it
>>  without loading the actual library. Then we read in the binary JSON that is
>>  stored there.
>
> Well, obviously that data is also stored in the plugin file in a way that the
> plugin loader can find and use it. So I guess it could be both.
>
> Either way it's a lot more straightforward to use the
> QPlatformNativeInterface::NativeResourceForIntegrationFunction mechanism for
> what I wanted to achieve, esp. if the target QPA already has one that can be
> extended.
>
> Thanks,
> R.
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

-- 
Regards,
Konstantin



More information about the Interest mailing list