Layouting::Layout Class | Extending Qt Creator Manual

- Extending Qt Creator Manual
- QtCreator
- Layout
- Extending Qt Creator Manual 19.0.0

# Layouting::Layout Class

class Layouting::Layout

Header: | `#include <Layout>`
Inherits: | Layouting::Object

- List of all members, including inherited members

## Public Functions

void | addItem(Layouting::Layout::I item)
void | addItems(std::initializer_list<Layouting::Layout::I> items)
void | addRow(std::initializer_list<Layouting::Layout::I> items)
void | attachTo(QWidget *widget)

## Detailed Description

The Layout class is a base class for more specific builder classes to create QLayout derived objects.

## Member Function Documentation

### void Layout::addItem(Layouting::Layout::I item)

Adds the layout item item as a sub item.

### void Layout::addItems(std::initializer_list<Layouting::Layout::I> items)

Adds the layout items items as sub items.

### void Layout::addRow(std::initializer_list<Layouting::Layout::I> 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 Layout::attachTo(QWidget *widget)

Attaches the constructed layout to the provided QWidget widget.

This operation can only be performed once per LayoutBuilder instance.