[Interest] Introspecting Qt based shared object (DLL)

Thiago Macieira thiago.macieira at intel.com
Fri Nov 27 08:11:48 CET 2015


On Friday 27 November 2015 14:54:09 Ch'Gans wrote:
> Hi there,
> 
> In short, here is the problem I'm trying to solve:
> 
> Given a shared object that contains QObject derived classes, I want to:
> - Enumerate the class names
> - Create instances of these class and interact with them
> 
> I would like to do that with Qt and I would like it to be platform
> independent (Linux/Mac/Windows).

Are they Qt plugins or are they libraries? If they are libraries, please use 
the headers that come with them.

If they are plugins, QPluginLoader will give you an instance which derives 
from the interface class (a QObject) that is defined in a library.

> These shared objects cannot depends on any of my own code (no Qt based
> plugin, no dedicated Interface, ...)
> 
> I can easily scan for shared object and load them using QLibrary,
> given any QMetaObject I can easily create instances and interact with
> them (signals, slots and properties).
> My big problem is how do I access all these static QMetaObject without
> an explicit entry point.

You don't. You need an entry point.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Interest mailing list