QVBoxLayout Class Reference

#include <qboxlayout.h>

Inheritance diagram for QVBoxLayout:

Inheritance graph
[legend]
Collaboration diagram for QVBoxLayout:

Collaboration graph
[legend]
List of all members.

Detailed Description

The QVBoxLayout class lines up widgets vertically.

This class is used to construct vertical box layout objects. See QBoxLayout for details.

The simplest use of the class is like this:

snippets/layouts/layouts.cpp layout = new QHBoxLayout window = new QWidget window button1 button5 layout = new QVBoxLayout window->setLayout(layout) show

First, we create the widgets we want in the layout. Then, we create the QVBoxLayout object and add the widgets into the layout. Finally, we call QWidget::setLayout() to install the QVBoxLayout object onto the widget. At that point, the widgets in the layout are reparented to have window as their parent.

Horizontal box layout with five child widgets

See also:
QHBoxLayout, QGridLayout, QStackedLayout, {Layout Classes}, {Basic Layouts Example}

Definition at line 121 of file qboxlayout.h.

Public Member Functions

 QVBoxLayout ()
 QVBoxLayout (QWidget *parent)
 ~QVBoxLayout ()


Constructor & Destructor Documentation

QVBoxLayout::QVBoxLayout (  ) 

Constructs a new vertical box. You must add it to another layout.

Definition at line 1147 of file qboxlayout.cpp.

01148     : QBoxLayout(TopToBottom)
01149 {
01150 }

QVBoxLayout::QVBoxLayout ( QWidget parent  )  [explicit]

Constructs a new top-level vertical box with parent parent.

Definition at line 1137 of file qboxlayout.cpp.

01138     : QBoxLayout(TopToBottom, parent)
01139 {
01140 }

QVBoxLayout::~QVBoxLayout (  ) 

Destroys this box layout.

The layout's widgets aren't destroyed.

Definition at line 1214 of file qboxlayout.cpp.

01215 {
01216 }


The documentation for this class was generated from the following files:
Generated on Thu Mar 15 19:43:26 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1