Tour Preview

Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!

QWidgetItem Class

The QWidgetItem class is a layout item that represents a widget. More...

Header: #include <QWidgetItem>
qmake: QT += widgets
Inherits: QLayoutItem

Public Functions

QWidgetItem(QWidget *widget)
virtual ~QWidgetItem()

Reimplemented Public Functions

virtual QSizePolicy::ControlTypes controlTypes() const override
virtual Qt::Orientations expandingDirections() const override
virtual QRect geometry() const override
virtual bool hasHeightForWidth() const override
virtual int heightForWidth(int w) const override
virtual bool isEmpty() const override
virtual QSize maximumSize() const override
virtual QSize minimumSize() const override
virtual void setGeometry(const QRect &rect) override
virtual QSize sizeHint() const override
virtual QWidget * widget() override

Detailed Description

The QWidgetItem class is a layout item that represents a widget.

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:

See also QLayout, QSpacerItem, and QLayoutItem::widget().

Member Function Documentation

QWidgetItem::QWidgetItem(QWidget *widget)

Creates an item containing the given widget.

[virtual] QWidgetItem::~QWidgetItem()


[override virtual] QSizePolicy::ControlTypes QWidgetItem::controlTypes() const

Reimplemented from QLayoutItem::controlTypes().

Returns the control type associated with the widget for which this size policy applies.

See also QSizePolicy::controlType().

[override virtual] Qt::Orientations QWidgetItem::expandingDirections() const

Reimplemented from QLayoutItem::expandingDirections().

[override virtual] QRect QWidgetItem::geometry() const

Reimplemented from QLayoutItem::geometry().

See also setGeometry().

[override virtual] bool QWidgetItem::hasHeightForWidth() const

Reimplemented from QLayoutItem::hasHeightForWidth().

[override virtual] int QWidgetItem::heightForWidth(int w) const

Reimplemented from QLayoutItem::heightForWidth().

[override virtual] bool QWidgetItem::isEmpty() const

Reimplemented from QLayoutItem::isEmpty().

Returns true if the widget is hidden; otherwise returns false.

See also QWidget::isHidden().

[override virtual] QSize QWidgetItem::maximumSize() const

Reimplemented from QLayoutItem::maximumSize().

[override virtual] QSize QWidgetItem::minimumSize() const

Reimplemented from QLayoutItem::minimumSize().

[override virtual] void QWidgetItem::setGeometry(const QRect &rect)

Reimplemented from QLayoutItem::setGeometry().

See also geometry().

[override virtual] QSize QWidgetItem::sizeHint() const

Reimplemented from QLayoutItem::sizeHint().

[override virtual] QWidget *QWidgetItem::widget()

Reimplemented from QLayoutItem::widget().

Returns the widget managed by this item.