In questa pagina

QDesignerObjectInspectorInterface Class

La classe `QDesignerObjectInspectorInterface` consente di modificare il focus dell'ispettore degli oggetti di ` Qt Widgets Designer`. Per saperne di più...

Intestazione: #include <QDesignerObjectInspectorInterface>
CMake: find_package(Qt6 REQUIRED COMPONENTS Designer)
target_link_libraries(mytarget PRIVATE Qt6::Designer)
qmake: QT += designer
Eredita: QWidget

Funzioni pubbliche

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

Slot pubblici

virtual void setFormWindow(QDesignerFormWindowInterface *formWindow) = 0

Descrizione dettagliata

È possibile utilizzare l'interfaccia QDesignerObjectInspectorInterface per modificare la selezione corrente della finestra del modulo. Ad esempio, quando si implementa un plugin per widget personalizzato:

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

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

La classe `QDesignerObjectInspectorInterface` non è pensata per essere istanziata direttamente. È possibile recuperare un'interfaccia per l'ispettore degli oggetti di Qt Widgets Designer utilizzando la funzione QDesignerFormEditorInterface::objectInspector(). Un puntatore all'oggetto QDesignerFormEditorInterface corrente di Qt Widgets Designer(formEditor nell'esempio sopra) viene fornito dal parametro della funzione QDesignerCustomWidgetInterface::initialize(). Quando si implementa un plugin per widget personalizzato, è necessario creare una sottoclasse di QDesignerCustomWidgetInterface per esporre il proprio plugin a Qt Widgets Designer.

L'interfaccia fornisce la funzione core() che è possibile utilizzare per recuperare un puntatore all'oggetto QDesignerFormEditorInterface corrente di Qt Widgets Designer, e la funzione setFormWindow() che consente di modificare la selezione corrente della finestra del modulo.

Vedere anche QDesignerFormEditorInterface e QDesignerFormWindowInterface.

Documentazione sulle funzioni membro

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

Crea un'interfaccia dell'ispettore degli oggetti con l'parent e specificata e la finestra specificata flags.

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

Elimina l'interfaccia dell'ispettore degli oggetti.

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

Restituisce un puntatore all'oggetto ` QDesignerFormEditorInterface ` corrente di ` Qt Widgets Designer`.

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

Imposta la finestra del modulo attualmente selezionata su 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.