|  | Home · All Classes · Main Classes · Annotated · Grouped Classes · Functions |

# QWidgetItem Class Reference

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

    #include <QWidgetItem>

Part of the QtGui module.

Inherits QLayoutItem.

- List of all members, including inherited members

### Public Functions

- QWidgetItem ( QWidget * widget )
- virtual bool isEmpty () const
- virtual QWidget * widget ()

- 16 public functions inherited from QLayoutItem

## 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:

Class | Functions
--- | ---
QBoxLayout | addWidget(), insertWidget(), setStretchFactor()
QGridLayout | addWidget()
QStackedLayout | addWidget(), insertWidget(), currentWidget(), setCurrentWidget(), widget()

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

## Member Function Documentation

### QWidgetItem::QWidgetItem ( QWidget * widget )

Creates an item containing the given widget.

### bool QWidgetItem::isEmpty () const `[virtual]`

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

Reimplemented from QLayoutItem.

See also QWidget::isHidden().

### QWidget * QWidgetItem::widget () `[virtual]`

Returns the widget managed by this item.

Reimplemented from QLayoutItem.