<class name="QVBoxLayout" doc="/** <p>The <a href="QVBoxLayout.html#QVBoxLayout()"><tt>QVBoxLayout</tt></a> class lines up widgets vertically.</p> <p>This class is used to construct vertical box layout objects. See <a href="QBoxLayout.html#QBoxLayout(com.trolltech.qt.gui.QBoxLayout.Direction, com.trolltech.qt.gui.QWidget)"><tt>QBoxLayout</tt></a> for details.</p> <p>The simplest use of the class is like this:</p> <pre> QWidget *window = new QWidget; QPushButton *button1 = new QPushButton(&quot;One&quot;); QPushButton *button2 = new QPushButton(&quot;Two&quot;); QPushButton *button3 = new QPushButton(&quot;Three&quot;); QPushButton *button4 = new QPushButton(&quot;Four&quot;); QPushButton *button5 = new QPushButton(&quot;Five&quot;); QVBoxLayout *layout = new QVBoxLayout; layout-&gt;addWidget(button1); layout-&gt;addWidget(button2); layout-&gt;addWidget(button3); layout-&gt;addWidget(button4); layout-&gt;addWidget(button5); window-&gt;setLayout(layout); window-&gt;show();</pre> <p>First, we create the widgets we want in the layout. Then, we create the <a href="QVBoxLayout.html#QVBoxLayout()"><tt>QVBoxLayout</tt></a> object and add the widgets into the layout. Finally, we call QWidget::setLayout() to install the <a href="QVBoxLayout.html#QVBoxLayout()"><tt>QVBoxLayout</tt></a> object onto the widget. At that point, the widgets in the layout are reparented to have <tt>window</tt> as their parent.</p> <p align="center"><img src="%2E%2E/images/qvboxlayout-with-5-children.png" alt="Horizontal box layout with five child widgets" /></p> @see <a href="QHBoxLayout.html"><tt>QHBoxLayout</tt></a> @see <a href="QGridLayout.html"><tt>QGridLayout</tt></a> @see <a href="QStackedLayout.html"><tt>QStackedLayout</tt></a> @see <a href="%2E%2E/layout.html">Layout Classes</tt></a> @see Basic Layouts Example</tt> */"> <method name="public QVBoxLayout(com.trolltech.qt.gui.QWidget parent)" doc="/** <p>Constructs a new top-level vertical box with parent <tt>parent</tt>.</p> */"/> <method name="public QVBoxLayout()" doc="/** <p>Constructs a new vertical box. You must add it to another layout.</p> */"/> </class>