
Originally Posted by
rianquinn
Q_EXPORT_PLUGIN2(TARGET, INTERFACE)
[...]
INTERFACE is the name of the interface that you are using. Mine is plugin_interface
shouldn't INTERFACE be 'plugin_menu_interface'? from the plug&paint example:
Q_EXPORT_PLUGIN2(pnp_basictools, BasicToolsPlugin)
Q_EXPORT_PLUGIN2(pnp_basictools, BasicToolsPlugin)
To copy to clipboard, switch view to plain text mode
where BasicToolsPlugin header is:
class BasicToolsPlugin
: public QObject,
public BrushInterface,
public ShapeInterface,
public FilterInterface
class BasicToolsPlugin : public QObject,
public BrushInterface,
public ShapeInterface,
public FilterInterface
To copy to clipboard, switch view to plain text mode
Using 'plugin_interface' in Q_EXPORT_PLUGIN2 will make the compiler complain as the macro will try to create an instance of the plugin_interface class which cannot be instantiated as being pure virtual.
G.
PS anyway I cannot make it work nor cannot debug QPluginLoader..trolltech should do something about that, who can I complain with?
Bookmarks