QVBoxLayout
The QVBoxLayout class lines up widgets vertically. If the widgets do not fit
in the window, the layout will automatically wrap or resize them. For a horizontal
layout, see QHBoxLayout.
Methods
Examples
In the above example, a vertical layout is created and a
QTextEdit widget is added to it using the addWidget method from the parent class QLayout.
addLayout(layout)
Adds a layout to the vertical box layout. The layout will be added below the existing layouts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
layout |
QLayout
|
the layout to add |
required |