QDesignerFormEditorInterface Class
La classe `QDesignerFormEditorInterface` vous permet d'accéder aux différents composants du Designer d'Qt Widgets. En savoir plus...
| En-tête : | #include <QDesignerFormEditorInterface> |
| CMake : | find_package(Qt6 REQUIRED COMPONENTS Designer) target_link_libraries(mytarget PRIVATE Qt6::Designer) |
| qmake : | QT += designer |
| Hérite de : | QObject |
Fonctions publiques
| QDesignerFormEditorInterface(QObject *parent = nullptr) | |
| virtual | ~QDesignerFormEditorInterface() |
| QDesignerActionEditorInterface * | actionEditor() const |
| QExtensionManager * | extensionManager() const |
| QDesignerFormWindowManagerInterface * | formWindowManager() const |
| QDesignerObjectInspectorInterface * | objectInspector() const |
| QDesignerPropertyEditorInterface * | propertyEditor() const |
| void | setActionEditor(QDesignerActionEditorInterface *actionEditor) |
| void | setObjectInspector(QDesignerObjectInspectorInterface *objectInspector) |
| void | setPropertyEditor(QDesignerPropertyEditorInterface *propertyEditor) |
| void | setWidgetBox(QDesignerWidgetBoxInterface *widgetBox) |
| QWidget * | topLevel() const |
| QDesignerWidgetBoxInterface * | widgetBox() const |
Description détaillée
Qt Widgets L'objet QDesignerFormEditorInterface actuel du Designer contient des informations sur tous les composants d'Qt Widgets: l'éditeur d'actions, l'inspecteur d'objets, l'éditeur de propriétés, la boîte à widgets, ainsi que les gestionnaires de fenêtres d'extension et de formulaire. QDesignerFormEditorInterface contient un ensemble de fonctions qui fournissent des interfaces vers tous ces composants. Elles sont généralement utilisées pour interroger (et manipuler) le composant concerné. Par exemple :
auto *objectInspector = formEditor->objectInspector();
auto *manager = formEditor->formWindowManager();
objectInspector->setFormWindow(manager->formWindow(0));QDesignerFormEditorInterface n’est pas destiné à être instancié directement. Un pointeur vers l’objet QDesignerFormEditorInterface actuel d’ Qt Widgets Designer (formEditor dans l’exemple ci-dessus) est fourni par le paramètre de la fonction QDesignerCustomWidgetInterface::initialize(). Lors de l’implémentation d’un plugin de widget personnalisé, vous devez créer une sous-classe de QDesignerCustomWidgetInterface afin d’exposer votre plugin à Qt Widgets Designer.
QDesignerFormEditorInterface fournit également des fonctions permettant de configurer l’éditeur d’actions, l’éditeur de propriétés, l’inspecteur d’objets et la boîte de widgets. Celles-ci ne sont utiles que si vous souhaitez fournir vos propres composants personnalisés.
Si le concepteur est intégré à un autre programme, il est possible de fournir son propre gestionnaire de paramètres. Ce gestionnaire est utilisé par les composants du concepteur d’ Qt Widgets s pour stocker et récupérer les paramètres de configuration persistants. Le gestionnaire par défaut utilise QSettings comme backend.
Enfin, QDesignerFormEditorInterface fournit la fonction topLevel() qui renvoie le widget de niveau supérieur d'Qt Widgets Designer.
Voir également QDesignerCustomWidgetInterface.
Documentation des fonctions membres
[explicit] QDesignerFormEditorInterface::QDesignerFormEditorInterface(QObject *parent = nullptr)
Crée un objet `QDesignerFormEditorInterface` avec l'parent` spécifiée.
[virtual noexcept] QDesignerFormEditorInterface::~QDesignerFormEditorInterface()
Supprime l'objet ` QDesignerFormEditorInterface `.
QDesignerActionEditorInterface *QDesignerFormEditorInterface::actionEditor() const
Renvoie une interface vers l'éditeur d'actions d'Qt Widgets Designer.
Voir également setActionEditor().
QExtensionManager *QDesignerFormEditorInterface::extensionManager() const
Renvoie une interface vers le gestionnaire d'extensions d'Qt Widgets Designer.
QDesignerFormWindowManagerInterface *QDesignerFormEditorInterface::formWindowManager() const
Renvoie une interface vers le gestionnaire de fenêtres de formulaires d’ Qt Widgets Designer.
QDesignerObjectInspectorInterface *QDesignerFormEditorInterface::objectInspector() const
Renvoie une interface vers l'inspecteur d'objets d'Qt Widgets Designer.
Voir aussi setObjectInspector().
QDesignerPropertyEditorInterface *QDesignerFormEditorInterface::propertyEditor() const
Renvoie une interface vers l'éditeur de propriétés d'Qt Widgets Designer.
Voir aussi setPropertyEditor().
void QDesignerFormEditorInterface::setActionEditor(QDesignerActionEditorInterface *actionEditor)
Définit l'éditeur d'actions de Qt Widgets Designer sur l'actionEditor spécifiée.
Voir également actionEditor().
void QDesignerFormEditorInterface::setObjectInspector(QDesignerObjectInspectorInterface *objectInspector)
Définit l'inspecteur d'objets du Designer d'Qt Widgets sur l'objectInspector spécifiée.
Voir également objectInspector().
void QDesignerFormEditorInterface::setPropertyEditor(QDesignerPropertyEditorInterface *propertyEditor)
Définit l'éditeur de propriétés de Qt Widgets Designer sur l'propertyEditor spécifiée.
Voir également propertyEditor().
void QDesignerFormEditorInterface::setWidgetBox(QDesignerWidgetBoxInterface *widgetBox)
Définit la boîte à outils du concepteur d'Qt Widgets s sur l'adresse spécifiée widgetBox.
Voir également widgetBox().
QWidget *QDesignerFormEditorInterface::topLevel() const
Renvoie le widget de niveau supérieur de l'Qt Widgets Designer.
QDesignerWidgetBoxInterface *QDesignerFormEditorInterface::widgetBox() const
Renvoie une interface vers la boîte de widgets du Designer d'Qt Widgets.
Voir aussi setWidgetBox().
© 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.