- Extending Qt Creator Manual
- QtCreator
- Widget
- Extending Qt Creator Manual 20.0.0-rc1

# Layouting::Widget Class

class Layouting::Widget

Base class for widget builder classes. More...

Header: | `#include <Widget>`
Inherits: | Layouting::Object
Inherited By: | Layouting::Canvas, Layouting::CompletingTextEdit, Layouting::Group, Layouting::Label, Layouting::LineEdit, Layouting::MarkdownBrowser, Layouting::PushButton, Layouting::ScrollArea, Layouting::SpinBox, Layouting::Spinner, Layouting::Splitter, Layouting::Stack, Layouting::TabWidget, Layouting::TextEdit, Layouting::ToolBar, and Layouting::ToolButton

- List of all members, including inherited members

## Public Functions

QWidget * | emerge() const
void | setLayout(const Layouting::Layout &layout)

## Detailed Description

Wraps a QWidget-derived object. Instances are ephemeral: construct and configure. They call emerge() to retrieve the underlying QWidget, or nest the builder inside a Layout to embed it directly.

See also Layouting::Layout.

## Member Function Documentation

### QWidget *Widget::emerge() const

Returns the underlying QWidget.

The caller does not take ownership. The widget is owned by the builder's parent widget or layout.

### void Widget::setLayout(const Layouting::Layout &layout)

Sets layout as the layout of this widget, finalizing it first.