![]() |
Qt 6.x
The Qt SDK
|
#include <qlayoutitem.h>
Public Member Functions | |
QWidgetItemV2 (QWidget *widget) | |
~QWidgetItemV2 () | |
QSize | sizeHint () const override |
\reimp | |
QSize | minimumSize () const override |
\reimp | |
QSize | maximumSize () const override |
\reimp | |
int | heightForWidth (int width) const override |
\reimp | |
![]() | |
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. | |
![]() | |
QLayoutItem (Qt::Alignment alignment=Qt::Alignment()) | |
Constructs a layout item with an alignment. | |
virtual | ~QLayoutItem () |
Destroys the QLayoutItem. | |
virtual QSize | sizeHint () const =0 |
Implemented in subclasses to return the preferred size of this item. | |
virtual QSize | minimumSize () const =0 |
Implemented in subclasses to return the minimum size of this item. | |
virtual QSize | maximumSize () const =0 |
Implemented in subclasses to return the maximum size of this item. | |
virtual Qt::Orientations | expandingDirections () const =0 |
Returns whether this layout item can make use of more space than sizeHint(). | |
virtual void | setGeometry (const QRect &)=0 |
Implemented in subclasses to set this item's geometry to r. | |
virtual QRect | geometry () const =0 |
Returns the rectangle covered by this layout item. | |
virtual bool | isEmpty () const =0 |
Implemented in subclasses to return whether this item is empty, i.e. | |
virtual bool | hasHeightForWidth () const |
Returns true if this layout's preferred height depends on its width; otherwise returns false . | |
virtual int | heightForWidth (int) const |
Returns the preferred height for this layout item, given the width, which is not used in this default implementation. | |
virtual int | minimumHeightForWidth (int) const |
Returns the minimum height this widget needs for the given width, w. | |
virtual void | invalidate () |
Invalidates any cached information in this layout item. | |
virtual QWidget * | widget () const |
If this item manages a QWidget, returns that widget. | |
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. | |
virtual QSizePolicy::ControlTypes | controlTypes () const |
Returns the control type(s) for the layout item. | |
Friends | |
class | QWidgetPrivate |
Additional Inherited Members | |
![]() | |
QWidget * | wid |
![]() | |
Qt::Alignment | align |
Definition at line 110 of file qlayoutitem.h.
|
explicit |
Definition at line 760 of file qlayoutitem.cpp.
References QWidgetItem::wid, and QWidgetPrivate::widgetItem.
QWidgetItemV2::~QWidgetItemV2 | ( | ) |
Definition at line 774 of file qlayoutitem.cpp.
References QObjectPrivate::get(), QWidgetItem::wid, and QWidgetPrivate::widgetItem.
|
overridevirtual |
\reimp
Reimplemented from QWidgetItem.
Definition at line 837 of file qlayoutitem.cpp.
References QWidgetItem::heightForWidth(), i, and QWidgetItem::isEmpty().
|
overridevirtual |
\reimp
Reimplemented from QWidgetItem.
Definition at line 809 of file qlayoutitem.cpp.
References QWidgetItem::isEmpty(), and QWidgetItem::maximumSize().
|
overridevirtual |
\reimp
Reimplemented from QWidgetItem.
Definition at line 796 of file qlayoutitem.cpp.
References QWidgetItem::isEmpty(), and QWidgetItem::minimumSize().
|
overridevirtual |
\reimp
Reimplemented from QWidgetItem.
Definition at line 783 of file qlayoutitem.cpp.
References QWidgetItem::isEmpty(), and QWidgetItem::sizeHint().
|
friend |
Definition at line 139 of file qlayoutitem.h.