![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
The QWidgetItem class is a layout item that represents a widget. More...
#include <qlayoutitem.h>
Public Member Functions | |
| QWidgetItem (QWidget *w) | |
| Creates an item containing the given widget. | |
| ~QWidgetItem () | |
| Destructor. | |
| QSize | sizeHint () const override |
| \reimp | |
| QSize | minimumSize () const override |
| \reimp | |
| QSize | maximumSize () const override |
| \reimp | |
| Qt::Orientations | expandingDirections () const override |
| \reimp | |
| bool | isEmpty () const override |
Returns true if the widget is hidden; otherwise returns false. | |
| void | setGeometry (const QRect &) override |
| \reimp | |
| QRect | geometry () const override |
| \reimp | |
| QWidget * | widget () const override |
| Returns the widget managed by this item. | |
| bool | hasHeightForWidth () const override |
| \reimp | |
| int | heightForWidth (int) const override |
| \reimp | |
| int | minimumHeightForWidth (int) const override |
| Returns the minimum height this widget needs for the given width, w. | |
| QSizePolicy::ControlTypes | controlTypes () const override |
| Returns the control type associated with the widget for which this size policy applies. | |
| Public Member Functions inherited from QLayoutItem | |
| QLayoutItem (Qt::Alignment alignment=Qt::Alignment()) | |
| Constructs a layout item with an alignment. | |
| virtual | ~QLayoutItem () |
| Destroys the QLayoutItem. | |
| virtual void | invalidate () |
| Invalidates any cached information in this layout item. | |
| virtual QLayout * | layout () |
| If this item is a QLayout, it is returned as a QLayout; otherwise \nullptr is returned. | |
| virtual QSpacerItem * | spacerItem () |
| If this item is a QSpacerItem, it is returned as a QSpacerItem; otherwise \nullptr is returned. | |
| Qt::Alignment | alignment () const |
| Returns the alignment of this item. | |
| void | setAlignment (Qt::Alignment a) |
| Sets the alignment of this item to alignment. | |
Protected Attributes | |
| QWidget * | wid |
| Protected Attributes inherited from QLayoutItem | |
| Qt::Alignment | align |
The QWidgetItem class is a layout item that represents a widget.
\inmodule QtWidgets
Normally, you don't need to use this class directly. Qt's built-in layout managers provide the following functions for manipulating widgets in layouts:
\table \header
Definition at line 86 of file qlayoutitem.h.
|
inlineexplicit |
Creates an item containing the given widget.
Definition at line 91 of file qlayoutitem.h.
|
default |
Destructor.
|
overridevirtual |
Returns the control type associated with the widget for which this size policy applies.
Reimplemented from QLayoutItem.
Definition at line 702 of file qlayoutitem.cpp.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
\reimp
Reimplemented from QLayoutItem.
Reimplemented in QWidgetItemV2.
Definition at line 508 of file qlayoutitem.cpp.
|
overridevirtual |
Returns true if the widget is hidden; otherwise returns false.
Implements QLayoutItem.
Definition at line 691 of file qlayoutitem.cpp.
|
overridevirtual |
\reimp
Implements QLayoutItem.
Reimplemented in QWidgetItemV2.
Definition at line 637 of file qlayoutitem.cpp.
|
overridevirtual |
Returns the minimum height this widget needs for the given width, w.
The default implementation simply returns heightForWidth(w).
Reimplemented from QLayoutItem.
Definition at line 537 of file qlayoutitem.cpp.
|
overridevirtual |
\reimp
Implements QLayoutItem.
Reimplemented in QWidgetItemV2.
Definition at line 616 of file qlayoutitem.cpp.
|
overridevirtual |
\reimp
Implements QLayoutItem.
Reimplemented in QWidgetItemV2.
Definition at line 659 of file qlayoutitem.cpp.
|
overridevirtual |
Returns the widget managed by this item.
Reimplemented from QLayoutItem.
Definition at line 330 of file qlayoutitem.cpp.
|
protected |
Definition at line 108 of file qlayoutitem.h.