WidgetFactory Class

(qdesigner_internal::WidgetFactory)
Inherits: QObject

Reimplemented Public Functions

virtual QWidget *containerOfWidget(QWidget *w) const override
virtual QLayout *createLayout(QWidget *widget, QLayout *parentLayout, int type) const override
virtual QWidget *widgetOfContainer(QWidget *w) const override

Member Function Documentation

[override virtual] QWidget *WidgetFactory::containerOfWidget(QWidget *w) const

Returns the widget into which children should be inserted when w is a container known to designer.

Usually, it is w itself, but there are exceptions (for example, a tabwidget is known to designer as a container, but the child widgets should be inserted into the current page of the tabwidget. In this case, the current page of the tabwidget would be returned.)

[override virtual] QLayout *WidgetFactory::createLayout(QWidget *widget, QLayout *parentLayout, int type) const

Creates a layout on the widget widget of the type type which can be HBox, VBox or Grid.

[override virtual] QWidget *WidgetFactory::widgetOfContainer(QWidget *w) const

Returns the actual designer widget of the container w. This is normally w itself, but it might be a parent or grand parent of w (for example, when working with a tabwidget and w is the container which contains and layouts children, but the actual widget known to designer is the tabwidget which is the parent of w. In this case, the tabwidget would be returned.)

© 2020 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.