LayoutItem Class | Extending Qt Creator Manual
Description: The LayoutItem class represents widgets, layouts, and aggregate items for use in conjunction with layout builders.

- Extending Qt Creator Manual
- QtCreator
- LayoutItem
- Extending Qt Creator Manual 13.0.1

# LayoutItem Class

class Layouting::LayoutItem

The LayoutItem class represents widgets, layouts, and aggregate items for use in conjunction with layout builders. More...

Header: | #include <LayoutItem>

- List of all members, including inherited members

## Public Functions

| LayoutItem()
void | addItem(const Layouting::LayoutItem &item)
void | addItems(const Layouting::LayoutItems &items)
void | addRow(const Layouting::LayoutItems &items)
void | attachTo(QWidget *w) const

## Detailed Description

Layout items are typically implicitly constructed when adding items to a `LayoutBuilder` instance using `LayoutBuilder::addItem()` or `LayoutBuilder::addItems()` and never stored in user code.

## Member Function Documentation

### LayoutItem::LayoutItem()

Constructs a layout item instance representing an empty cell.

### void LayoutItem::addItem(const Layouting::LayoutItem &item)

Adds the layout item item as sub items.

### void LayoutItem::addItems(const Layouting::LayoutItems &items)

Adds the layout items items as sub items.

### void LayoutItem::addRow(const Layouting::LayoutItems &items)

Starts a new row containing items. The row can be further extended by other items using `addItem()` or `addItems()`.

See also addItem() and addItems().

### void LayoutItem::attachTo(QWidget *w) const

Attaches the constructed layout to the provided QWidget w.

This operation can only be performed once per LayoutBuilder instance.