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

QGridWidget Class Reference

The QGridWidget class provides simple geometry management of its children. More...

#include <QGridWidget>

Inherits QFrame.

Public Types

Writable Properties

Read-Only Properties

Public Functions

Public Slots

Signals

Static Public Members

Protected Functions


Detailed Description

The QGridWidget class provides simple geometry management of its children.

The grid places its widgets either in columns or in rows depending on its orientation.

The number of rows or columns is defined in the constructor. All the grid's children will be placed and sized in accordance with their sizeHint() and sizePolicy().

Use setMargin() to add space around the grid itself, and setSpacing() to add space between the widgets.

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

QGridWidget

See also QVBoxWidget and QHBoxWidget.


Member Type Documentation

typedef QGridWidget::Direction


Member Function Documentation

QGridWidget::QGridWidget ( int n, QWidget * parent = 0, Qt::WFlags f = 0 )

Constructs a grid widget with parent parent. n specifies the number of columns. The widget flags f are passed to the QFrame constructor.

QGridWidget::QGridWidget ( int n, Qt::Orientation orientation, QWidget * parent = 0, Qt::WFlags f = 0 )

Constructs a grid widget with parent parent. If orientation is Qt::Horizontal, n specifies the number of columns. If orientation is Qt::Vertical, n specifies the number of rows. The widget flags f are passed to the QFrame constructor.

void QGridWidget::setMargin ( int margin )

Sets the margin around the grid to margin (expressed in pixels).

See also setSpacing().

void QGridWidget::setSpacing ( int spacing )

Sets the spacing between the child widgets to space (expressed in pixels).

See also setMargin().


Copyright © 2004 Trolltech Trademarks
Qt 4.0.0-b1