TQHBoxLayout Class

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

# TQHBoxLayout Class Reference

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

`#include <ntqlayout.h>`

Inherits TQBoxLayout.

List of all member functions.

## Public Members

- TQHBoxLayout ( TQWidget * parent, int margin = 0, int spacing = -1, const char * name = 0 )
- TQHBoxLayout ( TQLayout * parentLayout, int spacing = -1, const char * name = 0 )
- TQHBoxLayout ( int spacing = -1, const char * name = 0 )
- ~TQHBoxLayout ()

## Detailed Description

The TQHBoxLayout class lines up widgets horizontally.

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

The simplest use of the class is like this:

            TQBoxLayout * l = new TQHBoxLayout( widget );
            l->setAutoAdd( true );
            new TQSomeWidget( widget );
            new TQSomeOtherWidget( widget );
            new TQAnotherWidget( widget );

or like this:

            TQBoxLayout * l = new TQHBoxLayout( widget );
            l->addWidget( existingChildOfWidget );
            l->addWidget( anotherChildOfWidget );

See also TQVBoxLayout, TQGridLayout, the Layout overview, Widget Appearance and Style, and Layout Management.

## Member Function Documentation

### TQHBoxLayout::TQHBoxLayout ( TQWidget * parent, int margin = 0, int spacing = -1, const char * name = 0 )

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

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

### TQHBoxLayout::TQHBoxLayout ( TQLayout * parentLayout, int spacing = -1, const char * name = 0 )

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

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

### TQHBoxLayout::TQHBoxLayout ( int spacing = -1, const char * name = 0 )

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

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

### TQHBoxLayout::~TQHBoxLayout ()

Destroys this box layout.

The layout's widgets aren't destroyed.

This file is part of the TQt toolkit. Copyright © 1995-2007 Trolltech. All Rights Reserved.