The QDesignerFormEditorInterface class allows you to access Qt Widgets Designer's various components. 更多...
| 头: |
#include <QDesignerFormEditorInterface>
|
| CMake: |
find_package(Qt6 REQUIRED COMPONENTS Designer)
target_link_libraries(mytarget PRIVATE Qt6::Designer)
|
| qmake: |
QT += designer
|
| 继承: | QObject |
| 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 |
Qt Widgets Designer's current QDesignerFormEditorInterface object holds information about all Qt Widgets Designer's components: The action editor, the object inspector, the property editor, the widget box, and the extension and form window managers. QDesignerFormEditorInterface contains a collection of functions that provides interfaces to all these components. They are typically used to query (and manipulate) the respective component. For example:
auto *objectInspector = formEditor->objectInspector();
auto *manager = formEditor->formWindowManager();
objectInspector->setFormWindow(manager->formWindow(0));
QDesignerFormEditorInterface is not intended to be instantiated directly. A pointer to Qt Widgets Designer's current QDesignerFormEditorInterface object (
formEditor
in the example above) is provided by the
QDesignerCustomWidgetInterface::initialize
() function's parameter. When implementing a custom widget plugin, you must subclass the
QDesignerCustomWidgetInterface
to expose your plugin to Qt Widgets Designer.
QDesignerFormEditorInterface also provides functions that can set the action editor, property editor, object inspector and widget box. These are only useful if you want to provide your own custom components.
If designer is embedded in another program, one could to provide its own settings manager. The manager is used by the components of Qt Widgets Designer to store/retrieve persistent configuration settings. The default manager uses QSettings as the backend.
Finally, QDesignerFormEditorInterface provides the topLevel () function that returns Qt Widgets Designer's top-level widget.
另请参阅 QDesignerCustomWidgetInterface .
[explicit]
QDesignerFormEditorInterface::
QDesignerFormEditorInterface
(
QObject
*
parent
= nullptr)
Constructs a QDesignerFormEditorInterface object with the given parent .
[virtual noexcept]
QDesignerFormEditorInterface::
~QDesignerFormEditorInterface
()
销毁 QDesignerFormEditorInterface 对象。
Returns an interface to Qt Widgets Designer's action editor.
另请参阅 setActionEditor ().
Returns an interface to Qt Widgets Designer's extension manager.
Returns an interface to Qt Widgets Designer's form window manager.
Returns an interface to Qt Widgets Designer's object inspector.
另请参阅 setObjectInspector ().
Returns an interface to Qt Widgets Designer's property editor.
另请参阅 setPropertyEditor ().
Sets Qt Widgets Designer's action editor to be the specified actionEditor .
另请参阅 actionEditor ().
Sets Qt Widgets Designer's object inspector to be the specified objectInspector .
另请参阅 objectInspector ().
Sets Qt Widgets Designer's property editor to be the specified propertyEditor .
另请参阅 propertyEditor ().
Sets Qt Widgets Designer's widget box to be the specified widgetBox .
另请参阅 widgetBox ().
Returns Qt Widgets Designer's top-level widget.
Returns an interface to Qt Widgets Designer's widget box.
另请参阅 setWidgetBox ().