このページでは

QAbstractExtensionFactory Class

QAbstractExtensionFactory クラスは、Qt Widgets Designer における拡張ファクトリのためのインターフェースを提供します。詳細...

ヘッダー: #include <QAbstractExtensionFactory>
CMake: find_package(Qt6 REQUIRED COMPONENTS Designer)
target_link_libraries(mytarget PRIVATE Qt6::Designer)
qmake: QT += designer
継承元:

QExtensionFactory

パブリック関数

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

詳細な説明

QAbstractExtensionFactoryは直接インスタンス化されることを意図したクラスではありません。代わりにQExtensionFactory を使用してください。

Qt Widgets Designer では、拡張ファクトリを使用して、必要に応じて名前付き拡張機能を検索・作成します。そのため、カスタム拡張機能を実装する際は、QExtensionFactory (つまり、その拡張機能のインスタンスを作成できるクラス)も作成し、Qt Widgets Designer のextension manager を使用して登録する必要があります。

拡張機能が要求されると、Qt Widgets Designer のextension manager は、登録されているすべてのファクトリを順に処理し、それぞれに対してQExtensionFactory::createExtension()を呼び出し、選択されたオブジェクトに対して要求された拡張機能を作成できる最初のファクトリが見つかるまで続けます。その後、そのファクトリが拡張機能のインスタンスを作成します。

QExtensionFactory およびQExtensionManagerも参照してください 。

メンバ関数のドキュメント

[virtual noexcept] QAbstractExtensionFactory::~QAbstractExtensionFactory()

拡張機能ファクトリを破棄します。

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

指定された `object` に対して、iid で指定された拡張子を返します。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.