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
virtual QObject *createInstance
() = 0;
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:
QObject *TemplatePlugin
::createInstance() {
return new TemplatePlugin();
}
QObject *TemplatePlugin::createInstance()
{
return new TemplatePlugin();
}
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!
Bookmarks