このページでは

QDesignerObjectInspectorInterface Class

QDesignerObjectInspectorInterface クラスを使用すると、Qt Widgets Designer のオブジェクトインスペクタのフォーカスを変更することができます。詳細...

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

パブリック関数

QDesignerObjectInspectorInterface(QWidget *parent, Qt::WindowFlags flags = {})
virtual ~QDesignerObjectInspectorInterface() override
virtual QDesignerFormEditorInterface *core() const

パブリックスロット

virtual void setFormWindow(QDesignerFormWindowInterface *formWindow) = 0

詳細な説明

QDesignerObjectInspectorInterface を使用すると、現在のフォームウィンドウの選択を変更できます。たとえば、カスタムウィジェットプラグインを実装する場合:

        auto *objectInspector = formEditor->objectInspector();
        auto *manager = formEditor->formWindowManager();

        objectInspector->setFormWindow(manager->formWindow(0));

QDesignerObjectInspectorInterface クラスは、直接インスタンス化されることを意図したものではありません。QDesignerFormEditorInterface::objectInspector() 関数を使用して、Qt Widgets Designer のオブジェクトインスペクタへのインターフェースを取得できます。Qt Widgets Designer の現在のQDesignerFormEditorInterface オブジェクト(上記の例ではformEditor )へのポインタは、QDesignerCustomWidgetInterface::initialize() 関数のパラメータとして提供されます。カスタムウィジェットプラグインを実装する場合、QDesignerCustomWidgetInterface をサブクラス化して、Qt Widgets Designer に対してプラグインを公開する必要があります。

このインターフェースは、Qt Widgets Designer の現在のQDesignerFormEditorInterface オブジェクトへのポインタを取得するために使用できるcore()関数と、現在のフォームウィンドウの選択を変更できるsetFormWindow()関数を提供します。

「 QDesignerFormEditorInterface 」および「QDesignerFormWindowInterface 」も参照してください 。

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

[explicit] QDesignerObjectInspectorInterface::QDesignerObjectInspectorInterface(QWidget *parent, Qt::WindowFlags flags = {})

指定されたparent と、指定されたウィンドウflags を使用して、オブジェクトインスペクタのインターフェースを構築します。

[override virtual noexcept] QDesignerObjectInspectorInterface::~QDesignerObjectInspectorInterface()

オブジェクトインスペクタのインターフェースを破棄します。

[virtual] QDesignerFormEditorInterface *QDesignerObjectInspectorInterface::core() const

Qt Widgets Designer の現在のQDesignerFormEditorInterface オブジェクトへのポインタを返します。

[pure virtual slot] void QDesignerObjectInspectorInterface::setFormWindow(QDesignerFormWindowInterface *formWindow)

現在選択されているフォームウィンドウを「formWindow 」に設定します。

© 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.