En esta página

QDesignerObjectInspectorInterface Class

La clase `QDesignerObjectInspectorInterface` te permite cambiar el foco del inspector de objetos de ` Qt Widgets Designer`. Más información...

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

Funciones públicas

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

Ranuras públicas

virtual void setFormWindow(QDesignerFormWindowInterface *formWindow) = 0

Descripción detallada

Puedes utilizar la interfaz QDesignerObjectInspectorInterface para cambiar la selección actual de la ventana del formulario. Por ejemplo, al implementar un complemento de widget personalizado:

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

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

La clase QDesignerObjectInspectorInterface no está pensada para ser instanciada directamente. Se puede obtener una interfaz al inspector de objetos de ` Qt Widgets Designer` mediante la función ` QDesignerFormEditorInterface::objectInspector()`. El parámetro de la función ` QDesignerCustomWidgetInterface::initialize()` proporciona un puntero al objeto ` QDesignerFormEditorInterface ` actual de ` Qt Widgets Designer` (formEditor en el ejemplo anterior). Al implementar un complemento de widget personalizado, se debe crear una subclase de ` QDesignerCustomWidgetInterface ` para exponer el complemento a ` Qt Widgets Designer`.

La interfaz proporciona la función core() que puede utilizarse para recuperar un puntero al objeto QDesignerFormEditorInterface actual de Qt Widgets Designer, y la función setFormWindow() que permite cambiar la selección actual de la ventana del formulario.

Véase también QDesignerFormEditorInterface y QDesignerFormWindowInterface.

Documentación de funciones de miembro

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

Crea una interfaz de inspector de objetos con el parent proporcionado y la ventana especificada flags.

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

Elimina la interfaz del inspector de objetos.

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

Devuelve un puntero al objeto « QDesignerFormEditorInterface » actual de « Qt Widgets Designer ».

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

Establece la ventana del formulario seleccionada actualmente en « 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.