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() |
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 を持つオブジェクトインスペクタインターフェイスを構築します。
[virtual noexcept]
QDesignerObjectInspectorInterface::~QDesignerObjectInspectorInterface()
オブジェクト・インスペクタのインターフェースを破棄します。
[virtual]
QDesignerFormEditorInterface *QDesignerObjectInspectorInterface::core() const
Qt Widgets Designer の現在のQDesignerFormEditorInterface オブジェクトへのポインタを返します。
[pure virtual slot]
void QDesignerObjectInspectorInterface::setFormWindow(QDesignerFormWindowInterface *formWindow)
現在選択されているフォーム・ウィンドウをformWindow に設定します。
© 2025 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.