QAbstractExtensionManager Class | Qt Widgets Designer Manual
Description: The QAbstractExtensionManager class provides an interface for extension managers in Qt Widgets Designer.

- Qt 6.10
- Qt Widgets Designer Manual
- C++ Classes
- QAbstractExtensionManager
- Qt 6.10.3 Reference Documentation

# QAbstractExtensionManager Class

The QAbstractExtensionManager class provides an interface for extension managers in Qt Widgets Designer. More...

Header: | `#include <QAbstractExtensionManager>`
CMake: | `find_package(Qt6 REQUIRED COMPONENTS Designer)` `target_link_libraries(mytarget PRIVATE Qt6::Designer)`
qmake: | `QT += designer`
Inherited By: | QExtensionManager

- List of all members, including inherited members

## Public Functions

virtual | ~QAbstractExtensionManager()
virtual QObject * | extension(QObject *object, const QString &iid) const = 0
virtual void | registerExtensions(QAbstractExtensionFactory *factory, const QString &iid) = 0
virtual void | unregisterExtensions(QAbstractExtensionFactory *factory, const QString &iid) = 0

## Detailed Description

QAbstractExtensionManager is not intended to be instantiated directly; use the QExtensionManager instead.

In Qt Widgets Designer, extension are not created until they are required. For that reason, when implementing a custom extension, you must also create a QExtensionFactory, i.e a class that is able to make an instance of your extension, and register it using Qt Widgets Designer's extension manager.

When an extension is required, Qt Widgets Designer's extension manager will run through all its registered factories calling QExtensionFactory::createExtension() for each until the first one that is able to create the requested extension for the selected object, is found. This factory will then make an instance of the extension.

See also QExtensionManager and QExtensionFactory.

## Member Function Documentation

### `[virtual noexcept]` QAbstractExtensionManager::~QAbstractExtensionManager()

Destroys the extension manager.

### `[pure virtual]` QObject *QAbstractExtensionManager::extension(QObject *object, const QString &iid) const

Returns the extension, specified by iid, for the given object.

### `[pure virtual]` void QAbstractExtensionManager::registerExtensions(QAbstractExtensionFactory *factory, const QString &iid)

Register the given extension factory with the extension specified by iid.

### `[pure virtual]` void QAbstractExtensionManager::unregisterExtensions(QAbstractExtensionFactory *factory, const QString &iid)

Unregister the given factory with the extension specified by iid.