Skip to content

Instantly share code, notes, and snippets.

@nowrep
Created February 12, 2012 14:55
Show Gist options
  • Save nowrep/1808911 to your computer and use it in GitHub Desktop.
Save nowrep/1808911 to your computer and use it in GitHub Desktop.
Listing all available plugins
QStringList availablePlugins = mApp->plugins()->getAvailablePlugins();
QStringList allowedPlugins = mApp->plugins()->getAllowedPlugins();
foreach(const QString & fileName, availablePlugins) {
PluginInterface* plugin = mApp->plugins()->getPlugin(fileName);
if (!plugin) {
continue;
}
// You now have plugin variable that can represent one plugin
plugin->pluginName();
plugin->pluginAuthor();
plugin->pluginInfo();
plugin->pluginDescription();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment