Hi,

I wanted to implement a factory method in my plugin interface for using more than one instance of the implemented plugin in my program afterwards.

So I have
Qt Code:
  1. virtual QObject *createInstance() = 0;
To copy to clipboard, switch view to plain text mode 
in the interface for my plugins.
And an example plugin implements this part like this:
Qt Code:
  1. QObject *TemplatePlugin::createInstance()
  2. {
  3. return new TemplatePlugin();
  4. }
To copy to clipboard, switch view to plain text mode 
But this seems not to work even if I try to manually cast my class TemplatePlugin to QObject.
The result is allways:
plugininterface.h:19: undefined reference to `_imp___ZTV15PluginInterface'

Perhaps I'm doing it all wrong right now, but that's why I'm asking.

Thanks in advance!