Classes - Annotated - Tree - Functions - Home - Structure

QGrid Class Reference

The QGrid widget provides simple geometry management of its children. More...

#include <qgrid.h>

Inherits QFrame.

List of all member functions.

Public Members

Protected Members


Detailed Description

The QGrid widget provides simple geometry management of its children.

The number of rows or columns is defined in the constructor. All its children will be placed and sized according to their sizeHint() and sizePolicy() return values.

Use setMargin() to add space around the edge, and use setSpacing() to add space between the widgets.

For more general control over grid layout, including multi-column and multi-row widgets, use QGridLayout directly.

See also QVBox and QHBox.


Member Function Documentation

QGrid::QGrid ( int n, QWidget * parent = 0, const char * name = 0, WFlags f = 0 )

Constructs a grid widget with parent parent and name name. n specifies the number of columns.

QGrid::QGrid ( int n, Orientation orient, QWidget * parent = 0, const char * name = 0, WFlags f = 0 )

Constructs a grid widget with parent parent and name name. If orient is Horizontal, n specifies the number of columns. If orient is Vertical, n specifies the number of rows.

void QGrid::setSpacing ( int space )

Sets the spacing between children to space.

Search the documentation, FAQ, qt-interest archive and more (uses www.trolltech.com):


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


Copyright © 2001 TrolltechTrademarks
Qt version 3.0.0-beta1-beta1