Fluent-Qt

Modules

Plugins

Activate in-process extensions in dependency order and shut them down cleanly.

Register and activate

Link FluentQt::Plugins. Register Plugin objects with PluginManager, then call activate() with the ID from the plugin's metadata(). The manager activates dependencies first and rolls back the attempt if one of them fails. It does not load shared libraries.

#include <FluentQt/Plugins.h>

// greetingPlugin.metadata().id == "example.greeting"
fluent::plugins::PluginManager manager(host);
if (manager.registerPlugin(&greetingPlugin))
    manager.activate(QStringLiteral("example.greeting"));

Ownership and threads

PluginManager borrows plugins, the host, and widgets created by WidgetPlugin; your application owns them. Make every call on the manager's thread, and call deactivateAll() before destroying the host or its models.

API reference