Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 112b0974ad288f6cd55bf971ee6026a9 > files > 1344

libqt3-devel-3.0.2-2mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /tmp/qt-3.0-reggie-28534/qt-x11-free-3.0.2/src/kernel/qlayout.cpp:858 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>QGridLayout Class</title>
<style type="text/css"><!--
h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #ffffff; color: black; }
--></style>
</head>
<body>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="#E5E5E5">
<td valign=center>
 <a href="index.html">
<font color="#004faf">Home</font></a>
 | <a href="classes.html">
<font color="#004faf">All&nbsp;Classes</font></a>
 | <a href="mainclasses.html">
<font color="#004faf">Main&nbsp;Classes</font></a>
 | <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
 | <a href="groups.html">
<font color="#004faf">Grouped&nbsp;Classes</font></a>
 | <a href="functions.html">
<font color="#004faf">Functions</font></a>
</td>
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QGridLayout Class Reference</h1>

<p>The QGridLayout class lays out widgets in a grid.
<a href="#details">More...</a>
<p><tt>#include &lt;<a href="qlayout-h.html">qlayout.h</a>&gt;</tt>
<p>Inherits <a href="qlayout.html">QLayout</a>.
<p><a href="qgridlayout-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li><div class=fn><a href="#QGridLayout"><b>QGridLayout</b></a> ( QWidget&nbsp;*&nbsp;parent, int&nbsp;nRows = 1, int&nbsp;nCols = 1, int&nbsp;margin = 0, int&nbsp;space = -1, const&nbsp;char&nbsp;*&nbsp;name = 0 )</div></li>
<li><div class=fn><a href="#QGridLayout-2"><b>QGridLayout</b></a> ( int&nbsp;nRows = 1, int&nbsp;nCols = 1, int&nbsp;spacing = -1, const&nbsp;char&nbsp;*&nbsp;name = 0 )</div></li>
<li><div class=fn><a href="#QGridLayout-3"><b>QGridLayout</b></a> ( QLayout&nbsp;*&nbsp;parentLayout, int&nbsp;nRows = 1, int&nbsp;nCols = 1, int&nbsp;spacing = -1, const&nbsp;char&nbsp;*&nbsp;name = 0 )</div></li>
<li><div class=fn><a href="#~QGridLayout"><b>~QGridLayout</b></a> ()</div></li>
<li><div class=fn>virtual QSize <a href="#sizeHint"><b>sizeHint</b></a> () const</div></li>
<li><div class=fn>virtual QSize <a href="#minimumSize"><b>minimumSize</b></a> () const</div></li>
<li><div class=fn>virtual QSize <a href="#maximumSize"><b>maximumSize</b></a> () const</div></li>
<li><div class=fn>virtual void <a href="#setRowStretch"><b>setRowStretch</b></a> ( int&nbsp;row, int&nbsp;stretch )</div></li>
<li><div class=fn>virtual void <a href="#setColStretch"><b>setColStretch</b></a> ( int&nbsp;col, int&nbsp;stretch )</div></li>
<li><div class=fn>int <a href="#rowStretch"><b>rowStretch</b></a> ( int&nbsp;row ) const</div></li>
<li><div class=fn>int <a href="#colStretch"><b>colStretch</b></a> ( int&nbsp;col ) const</div></li>
<li><div class=fn>int <a href="#numRows"><b>numRows</b></a> () const</div></li>
<li><div class=fn>int <a href="#numCols"><b>numCols</b></a> () const</div></li>
<li><div class=fn>QRect <a href="#cellGeometry"><b>cellGeometry</b></a> ( int&nbsp;row, int&nbsp;col ) const</div></li>
<li><div class=fn>virtual bool <a href="#hasHeightForWidth"><b>hasHeightForWidth</b></a> () const</div></li>
<li><div class=fn>virtual int <a href="#heightForWidth"><b>heightForWidth</b></a> ( int&nbsp;w ) const</div></li>
<li><div class=fn>virtual QSizePolicy::ExpandData <a href="#expanding"><b>expanding</b></a> () const</div></li>
<li><div class=fn>virtual void <a href="#invalidate"><b>invalidate</b></a> ()</div></li>
<li><div class=fn>virtual void <a href="#addItem-2"><b>addItem</b></a> ( QLayoutItem&nbsp;*&nbsp;item )</div></li>
<li><div class=fn>void <a href="#addItem"><b>addItem</b></a> ( QLayoutItem&nbsp;*&nbsp;item, int&nbsp;row, int&nbsp;col )</div></li>
<li><div class=fn>void <a href="#addMultiCell"><b>addMultiCell</b></a> ( QLayoutItem&nbsp;*&nbsp;item, int&nbsp;fromRow, int&nbsp;toRow, int&nbsp;fromCol, int&nbsp;toCol, int&nbsp;alignment = 0 )</div></li>
<li><div class=fn>void <a href="#addWidget"><b>addWidget</b></a> ( QWidget&nbsp;*&nbsp;w, int&nbsp;row, int&nbsp;col, int&nbsp;alignment = 0 )</div></li>
<li><div class=fn>void <a href="#addMultiCellWidget"><b>addMultiCellWidget</b></a> ( QWidget&nbsp;*&nbsp;w, int&nbsp;fromRow, int&nbsp;toRow, int&nbsp;fromCol, int&nbsp;toCol, int&nbsp;alignment = 0 )</div></li>
<li><div class=fn>void <a href="#addLayout"><b>addLayout</b></a> ( QLayout&nbsp;*&nbsp;layout, int&nbsp;row, int&nbsp;col )</div></li>
<li><div class=fn>void <a href="#addMultiCellLayout"><b>addMultiCellLayout</b></a> ( QLayout&nbsp;*&nbsp;layout, int&nbsp;fromRow, int&nbsp;toRow, int&nbsp;fromCol, int&nbsp;toCol, int&nbsp;alignment = 0 )</div></li>
<li><div class=fn>void <a href="#addRowSpacing"><b>addRowSpacing</b></a> ( int&nbsp;row, int&nbsp;minsize )</div></li>
<li><div class=fn>void <a href="#addColSpacing"><b>addColSpacing</b></a> ( int&nbsp;col, int&nbsp;minsize )</div></li>
<li><div class=fn>void <a href="#expand"><b>expand</b></a> ( int&nbsp;nRows, int&nbsp;nCols )</div></li>
<li><div class=fn>enum <a href="#Corner-enum"><b>Corner</b></a> { TopLeft, TopRight, BottomLeft, BottomRight }</div></li>
<li><div class=fn>void <a href="#setOrigin"><b>setOrigin</b></a> ( Corner&nbsp;c )</div></li>
<li><div class=fn>Corner <a href="#origin"><b>origin</b></a> () const</div></li>
<li><div class=fn>virtual void <a href="#setGeometry"><b>setGeometry</b></a> ( const&nbsp;QRect&nbsp;&amp;&nbsp;r )</div></li>
</ul>
<h2>Protected Members</h2>
<ul>
<li><div class=fn>bool <a href="#findWidget"><b>findWidget</b></a> ( QWidget&nbsp;*&nbsp;w, int&nbsp;*&nbsp;row, int&nbsp;*&nbsp;col )</div></li>
<li><div class=fn>void <a href="#add"><b>add</b></a> ( QLayoutItem&nbsp;*&nbsp;item, int&nbsp;row, int&nbsp;col )</div></li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>


<p> The QGridLayout class lays out widgets in a grid.
<p> 


<p> QGridLayout takes the space it gets (from its parent layout or from
the <a href="qlayout.html#mainWidget">mainWidget</a>()), divides it up into rows and columns, and puts
each widget it manages into the correct cell.
<p> Columns and rows behave identically; we will discuss columns, but
there are equivalent functions for rows.
<p> Each column has a minimum width and a <a href="layout.html#stretch-factor">stretch factor</a>.  The minimum
width is the greatest of that set using <a href="#addColSpacing">addColSpacing</a>() and the
minimum width of each widget in that column. The stretch factor is
set using <a href="#setColStretch">setColStretch</a>() and determines how much of the available
space the column will get over and above its necessary minimum.
<p> Normally, each managed widget or layout is put into a cell of its
own using <a href="#addWidget">addWidget</a>(), <a href="#addLayout">addLayout</a>() or by the <a href="qlayout.html#setAutoAdd">auto-add facility</a>; but you can also put widgets
into multiple cells using <a href="#addMultiCellWidget">addMultiCellWidget</a>(). If you do this,
QGridLayout will guess how to distribute the size over the
columns/rows (based on the stretch factors).
<p> To remove a widget from a layout, either delete it or reparent it
with <a href="qwidget.html#reparent">QWidget::reparent</a>(). Hiding a widget with <a href="qwidget.html#hide">QWidget::hide</a>() also
effectively removes the widget from the layout, until
<a href="qwidget.html#show">QWidget::show</a>() is called.
<p> This illustration shows a fragment of a dialog with a five-column,
three-row grid (the grid is shown overlaid in magenta):
<p> <center><img src="gridlayout.png"></center> 
<p> Columns 0, 2 and 4 in this dialog fragment are made up of a <a href="qlabel.html">QLabel</a>,
a <a href="qlineedit.html">QLineEdit</a>, and a <a href="qlistbox.html">QListBox</a>.  Columns 1 and 3 are placeholders made
with <a href="#addColSpacing">addColSpacing</a>(). Row 0 consists of three QLabel objects, row 1
of three QLineEdit objects and row 2 of three QListBox objects.
We used placeholder columns (1 and 3) to get the right amount of space
between the columns.
<p> Note that the columns and rows are not equally wide or tall. If you
want two columns to have the same width, you must set their
minimum widths and stretch factors to be the same yourself. You do
this using addColSpacing() and <a href="#setColStretch">setColStretch</a>().
<p> If the QGridLayout is not the top-level layout (i.e. does not manage
all of the widget's area and children), you must add it to its
parent layout when you create it, but before you do
anything with it.  The normal way to add a layout is by calling
parentLayout-&gt;addLayout().
<p> Once you have added your layout you can start putting widgets and other
layouts into the cells of your grid layout using <a href="#addWidget">addWidget</a>(),
<a href="#addLayout">addLayout</a>() and <a href="#addMultiCellWidget">addMultiCellWidget</a>().
<p> QGridLayout also includes two margin widths: the border and the spacing.
The border is the width of the reserved space along each of the
QGridLayout's four sides. The spacing is the width of the automatically
allocated spacing between neighboring boxes.
<p> Both the border and the spacing are parameters of the constructor and
default to 0.
<p> <p>See also <a href="qgrid.html">QGrid</a>, <a href="layout.html">Layout Overview</a>, <a href="appearance.html">Widget Appearance and Style</a> and <a href="geomanagement.html">Layout Management</a>.

<hr><h2>Member Type Documentation</h2>
<h3 class=fn><a name="Corner-enum"></a>QGridLayout::Corner</h3>

<p> This enum identifies which corner is the origin (0, 0) of the layout.
<ul>
<li><tt>QGridLayout::TopLeft</tt> - the top-left corner
<li><tt>QGridLayout::TopRight</tt> - the top-right corner
<li><tt>QGridLayout::BottomLeft</tt> - the bottom-left corner
<li><tt>QGridLayout::BottomRight</tt> - the bottom-right corner
</ul>
<hr><h2>Member Function Documentation</h2>
<h3 class=fn><a name="QGridLayout"></a>QGridLayout::QGridLayout ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;parent, int&nbsp;nRows = 1, int&nbsp;nCols = 1, int&nbsp;margin = 0, int&nbsp;space = -1, const&nbsp;char&nbsp;*&nbsp;name = 0 )
</h3>
Constructs a new QGridLayout with <em>nRows</em> rows, <em>nCols</em> columns
with parent widget, <em>parent</em>. <em>parent</em> may not be 0. The grid
layout is called <em>name</em>.
<p> <em>margin</em> is the number of pixels between the edge of the widget and
its managed children. <em>space</em> is the default number of pixels
between cells.  If <em>space</em> is -1, the value of <em>margin</em> is used.

<h3 class=fn><a name="QGridLayout-2"></a>QGridLayout::QGridLayout ( int&nbsp;nRows = 1, int&nbsp;nCols = 1, int&nbsp;spacing = -1, const&nbsp;char&nbsp;*&nbsp;name = 0 )
</h3>
Constructs a new grid with <em>nRows</em> rows and <em>nCols</em> columns. If <em>spacing</em> is -1, this QGridLayout inherits its parent's <a href="qlayout.html#spacing">spacing</a>();
otherwise <em>spacing</em> is used. The grid layout is called <em>name</em>.
<p> You must insert this grid into another layout. You can insert
widgets and layouts into this layout at any time, but layout will
not be performed before this is inserted into another layout.

<h3 class=fn><a name="QGridLayout-3"></a>QGridLayout::QGridLayout ( <a href="qlayout.html">QLayout</a>&nbsp;*&nbsp;parentLayout, int&nbsp;nRows = 1, int&nbsp;nCols = 1, int&nbsp;spacing = -1, const&nbsp;char&nbsp;*&nbsp;name = 0 )
</h3>
Constructs a new grid that is placed inside <em>parentLayout</em>
with <em>nRows</em> rows and <em>nCols</em> columns.
If <em>spacing</em> is -1, this QGridLayout inherits its parent's
<a href="qlayout.html#spacing">spacing</a>(); otherwise <em>spacing</em> is used. The grid layout is called
<em>name</em>.
<p> This grid is placed according to <em>parentLayout</em>'s default placement
rules.

<h3 class=fn><a name="~QGridLayout"></a>QGridLayout::~QGridLayout ()
</h3>
Destroys the grid layout. Geometry management is terminated if
this is a top-level grid.

<h3 class=fn>void <a name="add"></a>QGridLayout::add ( <a href="qlayoutitem.html">QLayoutItem</a>&nbsp;*&nbsp;item, int&nbsp;row, int&nbsp;col )<tt> [protected]</tt>
</h3>
Adds <em>item</em> at position <em>row</em>, <em>col</em>. The layout takes ownership
of the <em>item</em>.

<h3 class=fn>void <a name="addColSpacing"></a>QGridLayout::addColSpacing ( int&nbsp;col, int&nbsp;minsize )
</h3>
Sets the minimum width of column <em>col</em> to <em>minsize</em> pixels.

<h3 class=fn>void <a name="addItem"></a>QGridLayout::addItem ( <a href="qlayoutitem.html">QLayoutItem</a>&nbsp;*&nbsp;item, int&nbsp;row, int&nbsp;col )
</h3>
Adds <em>item</em> at position <em>row</em>, <em>col</em>. The layout takes ownership
of the <em>item</em>.

<h3 class=fn>void <a name="addItem-2"></a>QGridLayout::addItem ( <a href="qlayoutitem.html">QLayoutItem</a>&nbsp;*&nbsp;item )<tt> [virtual]</tt>
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Adds <em>item</em> to the next free position of this layout.

<p>Reimplemented from <a href="qlayout.html#addItem">QLayout</a>.
<h3 class=fn>void <a name="addLayout"></a>QGridLayout::addLayout ( <a href="qlayout.html">QLayout</a>&nbsp;*&nbsp;layout, int&nbsp;row, int&nbsp;col )
</h3>
Places the <em>layout</em> at position (<em>row</em>, <em>col</em>) in the grid.
The top-left position is (0, 0).

<p>Examples: <a href="listbox-example.html#x1271">listbox/listbox.cpp</a>, <a href="progressbar-example.html#x817">progressbar/progressbar.cpp</a>, <a href="t10.html#x2178">t10/main.cpp</a> and <a href="t13.html#x2226">t13/gamebrd.cpp</a>.
<h3 class=fn>void <a name="addMultiCell"></a>QGridLayout::addMultiCell ( <a href="qlayoutitem.html">QLayoutItem</a>&nbsp;*&nbsp;item, int&nbsp;fromRow, int&nbsp;toRow, int&nbsp;fromCol, int&nbsp;toCol, int&nbsp;alignment = 0 )
</h3>
Adds the <em>item</em> to the cell grid, spanning multiple rows/columns.
<p> The cell will span from <em>fromRow</em>, <em>fromCol</em> to <em>toRow</em>, <em>toCol</em>. Alignment is specified by <em>alignment</em>, which is a bitwise
OR of Qt::AlignmentFlags values. The default alignment is 0, which
means that the widget fills the entire cell.

<h3 class=fn>void <a name="addMultiCellLayout"></a>QGridLayout::addMultiCellLayout ( <a href="qlayout.html">QLayout</a>&nbsp;*&nbsp;layout, int&nbsp;fromRow, int&nbsp;toRow, int&nbsp;fromCol, int&nbsp;toCol, int&nbsp;alignment = 0 )
</h3>
Adds the layout <em>layout</em> to the cell grid, spanning multiple
rows/columns. The cell will span from <em>fromRow</em>, <em>fromCol</em> to <em>toRow</em>, <em>toCol</em>.
<p> Alignment is specified by <em>alignment</em>, which is a bitwise OR of
Qt::AlignmentFlags values. The default alignment is 0, which means
that the widget fills the entire cell.
<p> A non-zero alignment indicates that the layout should not grow to
fill the available space but should be sized according to
<a href="#sizeHint">sizeHint</a>().

<h3 class=fn>void <a name="addMultiCellWidget"></a>QGridLayout::addMultiCellWidget ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;w, int&nbsp;fromRow, int&nbsp;toRow, int&nbsp;fromCol, int&nbsp;toCol, int&nbsp;alignment = 0 )
</h3>
Adds the widget <em>w</em> to the cell grid, spanning multiple
rows/columns. The cell will span from <em>fromRow</em>, <em>fromCol</em> to <em>toRow</em>, <em>toCol</em>.
<p> Alignment is specified by <em>alignment</em>, which is a bitwise OR of
Qt::AlignmentFlags values. The default alignment is 0, which means
that the widget fills the entire cell.
<p> A non-zero alignment indicates that the widget should not grow to
fill the available space but should be sized according to
<a href="#sizeHint">sizeHint</a>().

<p>Examples: <a href="cursor-example.html#x1857">cursor/cursor.cpp</a>, <a href="layout-example.html#x1329">layout/layout.cpp</a> and <a href="progressbar-example.html#x818">progressbar/progressbar.cpp</a>.
<h3 class=fn>void <a name="addRowSpacing"></a>QGridLayout::addRowSpacing ( int&nbsp;row, int&nbsp;minsize )
</h3>
Sets the minimum height of row <em>row</em> to <em>minsize</em> pixels.

<h3 class=fn>void <a name="addWidget"></a>QGridLayout::addWidget ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;w, int&nbsp;row, int&nbsp;col, int&nbsp;alignment = 0 )
</h3>
Adds the widget <em>w</em> to the cell grid at <em>row</em>, <em>col</em>.
The top-left position is (0, 0) by default.
<p> Alignment is specified by <em>alignment</em>, which is a bitwise OR of
Qt::AlignmentFlags values.
The default alignment is 0, which means
that the widget fills the entire cell.
<p> <ul>
<li> You should not call this if you have enabled the
<a href="qlayout.html#setAutoAdd">auto-add facility of the layout</a>.
<p> <li> The <em>alignment</em> parameter is interpreted more aggressively
than in previous versions of Qt.  A non-default alignment now
indicates that the widget should not grow to fill the available
space, but should be sized according to <a href="#sizeHint">sizeHint</a>().
</ul>

<p>Examples: <a href="addressbook-example.html#x1968">addressbook/centralwidget.cpp</a>, <a href="layout-example.html#x1330">layout/layout.cpp</a>, <a href="rot-example.html#x579">rot13/rot13.cpp</a>, <a href="sql.html#x2335">sql/overview/form1/main.cpp</a>, <a href="sql.html#x2344">sql/overview/form2/main.cpp</a>, <a href="t14.html#x2254">t14/gamebrd.cpp</a> and <a href="t8.html#x2150">t8/main.cpp</a>.
<h3 class=fn><a href="qrect.html">QRect</a> <a name="cellGeometry"></a>QGridLayout::cellGeometry ( int&nbsp;row, int&nbsp;col ) const
</h3>
Returns the geometry of the cell with row <em>row</em> and column
<em>col</em> in the grid. Returns an invalid rectangle if <em>row</em> or
<em>col</em> is outside the grid.
<p> <b>Warning:</b> in the current version of Qt this function does not return
valid results until <a href="#setGeometry">setGeometry</a>() has been called, i.e. after the
<a href="qlayout.html#mainWidget">mainWidget</a>() is visible.
<p> 
<h3 class=fn>int <a name="colStretch"></a>QGridLayout::colStretch ( int&nbsp;col ) const
</h3>
Returns the <a href="layout.html#stretch-factor">stretch factor</a> for column <em>col</em>.
<p>See also <a href="#setColStretch">setColStretch</a>().

<h3 class=fn>void <a name="expand"></a>QGridLayout::expand ( int&nbsp;nRows, int&nbsp;nCols )
</h3>
Expands this grid so that it will have <em>nRows</em> rows and <em>nCols</em> columns.
Will not shrink the grid. You should not need to call this function because
QGridLayout expands automatically as new items are inserted.

<h3 class=fn><a href="qsizepolicy.html#ExpandData-enum">QSizePolicy::ExpandData</a> <a name="expanding"></a>QGridLayout::expanding () const<tt> [virtual]</tt>
</h3>
Returns the expansiveness of this layout.

<p>Reimplemented from <a href="qlayout.html#expanding">QLayout</a>.
<h3 class=fn>bool <a name="findWidget"></a>QGridLayout::findWidget ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;w, int&nbsp;*&nbsp;row, int&nbsp;*&nbsp;col )<tt> [protected]</tt>
</h3>
Searches for widget <em>w</em> in this layout (not including child
layouts).  If <em>w</em> is found, it sets <tt>*&lt;em&gt;row&lt;/em&gt;</tt> and <tt>*&lt;em&gt;col&lt;/em&gt;</tt> to
the row and column and returns TRUE. If <em>w</em> is not found, FALSE is
returned.
<p> Note: if a widget spans multiple rows/columns, the top-left cell
is returned.

<h3 class=fn>bool <a name="hasHeightForWidth"></a>QGridLayout::hasHeightForWidth () const<tt> [virtual]</tt>
</h3>
Returns TRUE if this layout's preferred height depends on its
width; otherwise returns FALSE.

<p>Reimplemented from <a href="qlayoutitem.html#hasHeightForWidth">QLayoutItem</a>.
<h3 class=fn>int <a name="heightForWidth"></a>QGridLayout::heightForWidth ( int&nbsp;w ) const<tt> [virtual]</tt>
</h3>
Returns the layout's preferred height when it is <em>w</em> pixels wide.

<p>Reimplemented from <a href="qlayoutitem.html#heightForWidth">QLayoutItem</a>.
<h3 class=fn>void <a name="invalidate"></a>QGridLayout::invalidate ()<tt> [virtual]</tt>
</h3>
Resets cached information.

<p>Reimplemented from <a href="qlayout.html#invalidate">QLayout</a>.
<h3 class=fn><a href="qsize.html">QSize</a> <a name="maximumSize"></a>QGridLayout::maximumSize () const<tt> [virtual]</tt>
</h3>
Returns the maximum size needed by this grid.

<p>Reimplemented from <a href="qlayout.html#maximumSize">QLayout</a>.
<h3 class=fn><a href="qsize.html">QSize</a> <a name="minimumSize"></a>QGridLayout::minimumSize () const<tt> [virtual]</tt>
</h3>
Returns the minimum size needed by this grid.

<p>Reimplemented from <a href="qlayout.html#minimumSize">QLayout</a>.
<h3 class=fn>int <a name="numCols"></a>QGridLayout::numCols () const
</h3>
Returns the number of columns in this grid.

<h3 class=fn>int <a name="numRows"></a>QGridLayout::numRows () const
</h3>
Returns the number of rows in this grid.

<h3 class=fn><a href="qgridlayout.html#Corner-enum">Corner</a> <a name="origin"></a>QGridLayout::origin () const
</h3>
Returns which of the four corners of the grid corresponds to (0, 0).

<h3 class=fn>int <a name="rowStretch"></a>QGridLayout::rowStretch ( int&nbsp;row ) const
</h3>
Returns the <a href="layout.html#stretch-factor">stretch factor</a> for row <em>row</em>.
<p>See also <a href="#setRowStretch">setRowStretch</a>().

<h3 class=fn>void <a name="setColStretch"></a>QGridLayout::setColStretch ( int&nbsp;col, int&nbsp;stretch )<tt> [virtual]</tt>
</h3>
Sets the <a href="layout.html#stretch-factor">stretch factor</a> of column <em>col</em> to <em>stretch</em>.
The first column is number 0.
<p> The stretch factor is relative to the other columns in this grid.
Columns with a higher stretch factor take more of the available space.
<p> The default stretch factor is 0.
If the stretch factor is 0 and no other column in this table can
grow at all, the column may still grow.
<p> <p>See also <a href="#colStretch">colStretch</a>(), <a href="#addColSpacing">addColSpacing</a>() and <a href="#setRowStretch">setRowStretch</a>().

<p>Examples: <a href="layout-example.html#x1331">layout/layout.cpp</a>, <a href="t14.html#x2255">t14/gamebrd.cpp</a> and <a href="t8.html#x2151">t8/main.cpp</a>.
<h3 class=fn>void <a name="setGeometry"></a>QGridLayout::setGeometry ( const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;r )<tt> [virtual]</tt>
</h3>
Resizes managed widgets within the rectangle <em>r</em>.

<p>Reimplemented from <a href="qlayout.html#setGeometry">QLayout</a>.
<h3 class=fn>void <a name="setOrigin"></a>QGridLayout::setOrigin ( <a href="qgridlayout.html#Corner-enum">Corner</a>&nbsp;c )
</h3>
Sets which of the four corners of the grid corresponds to (0, 0) to <em>c</em>.

<h3 class=fn>void <a name="setRowStretch"></a>QGridLayout::setRowStretch ( int&nbsp;row, int&nbsp;stretch )<tt> [virtual]</tt>
</h3>
Sets the <a href="layout.html#stretch-factor">stretch factor</a> of row <em>row</em> to <em>stretch</em>.
The first row is number 0.
<p> The stretch factor is relative to the other rows in this grid.
Rows with a higher stretch factor take more of the available space.
<p> The default stretch factor is 0.
If the stretch factor is 0 and no other row in this table can
grow at all, the row may still grow.
<p> <p>See also <a href="#rowStretch">rowStretch</a>(), <a href="#addRowSpacing">addRowSpacing</a>() and <a href="#setColStretch">setColStretch</a>().

<p>Example: <a href="addressbook-example.html#x1969">addressbook/centralwidget.cpp</a>.
<h3 class=fn><a href="qsize.html">QSize</a> <a name="sizeHint"></a>QGridLayout::sizeHint () const<tt> [virtual]</tt>
</h3>
Returns the preferred size of this grid.

<p>Reimplemented from <a href="qlayoutitem.html#sizeHint">QLayoutItem</a>.
<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>.
Copyright &copy; 1995-2001
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
<table width=100% cellspacing=0 border=0><tr>
<td>Copyright &copy; 2001 
<a href="http://www.trolltech.com">Trolltech</a><td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align=right><div align=right>Qt version 3.0.2</div>
</table></div></address></body>
</html>