Home · All Classes · Main Classes · Annotated · Grouped Classes · Functions

QHBoxWidget Class Reference

The QHBoxWidget class provides horizontal geometry management for its child widgets. More...

#include <QHBoxWidget>

Part of the QtGui module.

Inherits QFrame.

Inherited by QVBoxWidget.

Public Functions

Protected Functions

Additional Inherited Members


Detailed Description

The QHBoxWidget class 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.

QHBoxWidget

See also QVBoxWidget and QGridWidget.


Member Function Documentation

QHBoxWidget::QHBoxWidget ( 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.

QHBoxWidget::QHBoxWidget ( 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 QHBoxWidget::setMargin ( int margin )

Set the width of the outside border margin

void QHBoxWidget::setSpacing ( int space )

Sets the spacing between the child widgets to space.

bool QHBoxWidget::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 © 2005 Trolltech Trademarks
Qt 4.0.0-b2