Sur cette page

QDesignerObjectInspectorInterface Class

La classe QDesignerObjectInspectorInterface vous permet de changer le focus de l'inspecteur d'objets de Qt Widgets Designer. Plus d'informations...

En-tête : #include <QDesignerObjectInspectorInterface>
CMake : find_package(Qt6 REQUIRED COMPONENTS Designer)
target_link_libraries(mytarget PRIVATE Qt6::Designer)
qmake : QT += designer
Héritages : QWidget

Fonctions publiques

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

Emplacements publics

virtual void setFormWindow(QDesignerFormWindowInterface *formWindow) = 0

Description détaillée

Vous pouvez utiliser l'interface QDesignerObjectInspectorInterface pour modifier la sélection actuelle de la fenêtre du formulaire. Par exemple, lors de l'implémentation d'un plugin de widget personnalisé :

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

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

La classe QDesignerObjectInspectorInterface n'est pas destinée à être instanciée directement. Vous pouvez récupérer une interface de l'inspecteur d'objets de Qt Widgets Designer à l'aide de la fonction QDesignerFormEditorInterface::objectInspector(). Un pointeur sur l'objet Qt Widgets Designer's courant QDesignerFormEditorInterface (formEditor dans l'exemple ci-dessus) est fourni par le paramètre de la fonction QDesignerCustomWidgetInterface::initialize(). Lorsque vous implémentez un plugin de widget personnalisé, vous devez sous-classer l'interface QDesignerCustomWidgetInterface pour exposer votre plugin à Qt Widgets Designer.

L'interface fournit la fonction core() que vous pouvez utiliser pour récupérer un pointeur sur l'objet QDesignerFormEditorInterface actuel de Qt Widgets Designer et la fonction setFormWindow() qui vous permet de modifier la sélection de la fenêtre de formulaire actuelle.

Voir également QDesignerFormEditorInterface et QDesignerFormWindowInterface.

Documentation des fonctions membres

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

Construit une interface d'inspecteur d'objets avec l'adresse parent donnée et la fenêtre spécifiée flags.

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

Détruit l'interface de l'inspecteur d'objets.

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

Renvoie un pointeur sur l'objet Qt Widgets Designer's courant QDesignerFormEditorInterface.

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

Définit la fenêtre de formulaire actuellement sélectionnée sur 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.