QAbstractExtensionFactory 類

The QAbstractExtensionFactory class provides an interface for extension factories in Qt Designer. 更多...

頭: #include <QAbstractExtensionFactory>
qmake: QT += designer
繼承者:

QExtensionFactory

公共函數

virtual ~QAbstractExtensionFactory ()
virtual QObject * extension (QObject * object , const QString & iid ) const = 0

詳細描述

QAbstractExtensionFactory is not intended to be instantiated directly; use the QExtensionFactory 代替。

Qt Designer , extension factories are used to look up and create named extensions as 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 Designer 's extension manager .

When an extension is required, Qt 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.

另請參閱 QExtensionFactory and QExtensionManager .

成員函數文檔編製

[虛擬] QAbstractExtensionFactory:: ~QAbstractExtensionFactory ()

Destroys the extension factory.

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

Returns the extension specified by iid 為給定 object .