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

QHBox Class Reference

The QHBox widget provides horizontal geometry management for its child widgets. More...

#include <QHBox>

Inherits QFrame.

Inherited by QVBox.

List of all members.

Writable Properties

Read-Only Properties

Public Functions

Public Slots

Signals

Static Public Members

Protected Functions


Detailed Description

The QHBox widget provides horizontal geometry management for its child widgets.

All the horizontal box's child widgets will be placed alongside each other and sized according to their sizeHint()s.

Use setMargin() to add space around the edges, and use setSpacing() to add space between the widgets. Use setStretchFactor() if you want the widgets to be different sizes in proportion to one another. (See Layouts for more information on stretch factors.)

If you just need a layout (not a widget) use QHBoxLayout instead.

QHBox

See also QVBox and QGrid.


Member Function Documentation

QHBox::QHBox ( QWidget * parent = 0, Qt::WFlags f = 0 )

Constructs an hbox widget with parent parent. The parent and widget flags, f, are passed to the QFrame constructor.

QHBox::QHBox ( Qt::Orientation orientation, QWidget * parent, Qt::WFlags f )   [protected]

Constructs a horizontal hbox if orientation is Qt::Horizontal, and constructs a vertical hbox (i.e. a vbox) if orientation is Qt::Vertical.

This constructor is provided for the QVBox class. You should never need to use it directly.

The parent and widget flags, f, are passed to the QFrame constructor.

void QHBox::setMargin ( int margin )

Set the width of the outside border margin

void QHBox::setSpacing ( int space )

Sets the spacing between the child widgets to space.

bool QHBox::setStretchFactor ( QWidget * w, int stretch )

Sets the stretch factor of widget w to stretch. Returns true if w is found. Otherwise returns false.

See also QBoxLayout::setStretchFactor() and Layouts.


Copyright © 2004 Trolltech. Trademarks
Qt 4.0.0-tp1