Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions

QHBoxLayout Class Reference

The QHBoxLayout class lines up widgets horizontally. More...

#include <qlayout.h>

Inherits QBoxLayout.

List of all member functions.

Public Members


Detailed Description

The QHBoxLayout class lines up widgets horizontally.

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

The simplest way to use this class is like this:

     QBoxLayout * l = new QHBoxLayout( widget );
     l->setAutoAdd( TRUE );
     new QSomeWidget( widget );
     new QSomeOtherWidget( widget );
     new QAnotherWidget( widget );
  

or like this:

     QBoxLayout * l = new QHBoxLayout( widget );
     l->addWidget( existingChildOfWidget );
     l->addWidget( anotherChildOfWidget );
  

See also QVBoxLayout, QGridLayout, the Layout overview, Widget Appearance and Style and Geometry (Layout) Management.


Member Function Documentation

QHBoxLayout::QHBoxLayout ( QWidget * parent, int border = 0, int space = -1, const char * name = 0 )

Constructs a new top-level horizontal box with parent parent and name name.

The border is the number of pixels between the edge of the widget and its managed children. The space is the default number of pixels between neighboring children. If space is -1 the value of border is used for space.

QHBoxLayout::QHBoxLayout ( QLayout * parentLayout, int space = -1, const char * name = 0 )

Constructs a new horizontal box with the name name and adds it to parentLayout.

The space is the default number of pixels between neighboring children. If space is -1, this QHBoxLayout will inherit its parent's spacing().

QHBoxLayout::QHBoxLayout ( int space = -1, const char * name = 0 )

Constructs a new horizontal box with the name name. You must add it to another layout.

The space is the default number of pixels between neighboring children. If space is -1, this QHBoxLayout will inherit its parent's spacing().

QHBoxLayout::~QHBoxLayout ()

Destroys this box layout.

This file is part of the Qt toolkit, copyright © 1995-2001 Trolltech, all rights reserved.


Copyright © 2001 TrolltechTrademarks
Qt version 3.0.0-beta5