All-

I've got a collection of plugin classes that all implement a proper interface (ie, it the class does not inheirit from QObject) that I'd like to get signals working over. To illustrate (hoping this works and clarifies the issue):

Qt Code:
  1. CommonClass InterfaceClass
  2. | (inherits) |
  3. | | (implements)
  4. |+Plugin1+-------|
  5. |+Plugin2+-------|
  6. |+Plugin3+-------|
To copy to clipboard, switch view to plain text mode 

** CommonClass (compiled into library) extends QObject, and has declarations for signals and slots
** Each Plugin class (compiled into library) extends CommonClass in a "is-a" pattern
** InterfaceClass is an interface with *no* implementation and is not a QObject subclass
** MainApplication loads PluginN classes via QPluginLoader by qobject_cast-ing to InterfaceClass

Since InterfaceClass doesn't extend QObject, I can't put signal/slot declarations there; they all extend CommonClass, but it'd be a real pain to qobject_cast the plugins to CommonClass to connect the signals.

I've looked at how the QObject::connect works and see that it eventually uses the QMetaObejcts from the caller and receiver classes. I can use QMetaObject->superClass() to get the classname of a particular plugin (CommonClass, in this example), but don't seem to be able to get a handle on the signal emitted from CommonClass (and, seemingly therefore each plugin).

Thoughts or ideas on how to get this working?