<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- /home/reggie/tmp/qt-3.1-reggie-23625/qt-x11-free-3.1.1/src/kernel/qlayout.cpp:874 --> <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 Classes</font></a> | <a href="mainclasses.html"> <font color="#004faf">Main Classes</font></a> | <a href="annotated.html"> <font color="#004faf">Annotated</font></a> | <a href="groups.html"> <font color="#004faf">Grouped 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 <<a href="qlayout-h.html">qlayout.h</a>></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 * parent, int nRows = 1, int nCols = 1, int margin = 0, int space = -1, const char * name = 0 )</div></li> <li><div class=fn><a href="#QGridLayout-2"><b>QGridLayout</b></a> ( int nRows = 1, int nCols = 1, int spacing = -1, const char * name = 0 )</div></li> <li><div class=fn><a href="#QGridLayout-3"><b>QGridLayout</b></a> ( QLayout * parentLayout, int nRows = 1, int nCols = 1, int spacing = -1, const char * 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 row, int stretch )</div></li> <li><div class=fn>virtual void <a href="#setColStretch"><b>setColStretch</b></a> ( int col, int stretch )</div></li> <li><div class=fn>int <a href="#rowStretch"><b>rowStretch</b></a> ( int row ) const</div></li> <li><div class=fn>int <a href="#colStretch"><b>colStretch</b></a> ( int 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 row, int 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 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 * item )</div></li> <li><div class=fn>void <a href="#addItem"><b>addItem</b></a> ( QLayoutItem * item, int row, int col )</div></li> <li><div class=fn>void <a href="#addMultiCell"><b>addMultiCell</b></a> ( QLayoutItem * item, int fromRow, int toRow, int fromCol, int toCol, int alignment = 0 )</div></li> <li><div class=fn>void <a href="#addWidget"><b>addWidget</b></a> ( QWidget * w, int row, int col, int alignment = 0 )</div></li> <li><div class=fn>void <a href="#addMultiCellWidget"><b>addMultiCellWidget</b></a> ( QWidget * w, int fromRow, int toRow, int fromCol, int toCol, int alignment = 0 )</div></li> <li><div class=fn>void <a href="#addLayout"><b>addLayout</b></a> ( QLayout * layout, int row, int col )</div></li> <li><div class=fn>void <a href="#addMultiCellLayout"><b>addMultiCellLayout</b></a> ( QLayout * layout, int fromRow, int toRow, int fromCol, int toCol, int alignment = 0 )</div></li> <li><div class=fn>void <a href="#addRowSpacing"><b>addRowSpacing</b></a> ( int row, int minsize )</div></li> <li><div class=fn>void <a href="#addColSpacing"><b>addColSpacing</b></a> ( int col, int minsize )</div></li> <li><div class=fn>void <a href="#expand"><b>expand</b></a> ( int nRows, int 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 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 QRect & r )</div></li> </ul> <h2>Protected Members</h2> <ul> <li><div class=fn>bool <a href="#findWidget"><b>findWidget</b></a> ( QWidget * w, int * row, int * col )</div></li> <li><div class=fn>void <a href="#add"><b>add</b></a> ( QLayoutItem * item, int row, int 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 made available to it (by its parent layout or by 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>. It is also possible for a widget to occupy 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, call removeWidget(). Calling <a href="qwidget.html#hide">QWidget::hide</a>() on a widget 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->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> * parent, int nRows = 1, int nCols = 1, int margin = 0, int space = -1, const char * name = 0 ) </h3> Constructs a new QGridLayout with <em>nRows</em> rows, <em>nCols</em> columns and 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 nRows = 1, int nCols = 1, int spacing = -1, const char * 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 laying out 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> * parentLayout, int nRows = 1, int nCols = 1, int spacing = -1, const char * 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. <p> The layout's widgets aren't destroyed. <h3 class=fn>void <a name="add"></a>QGridLayout::add ( <a href="qlayoutitem.html">QLayoutItem</a> * item, int row, int 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 col, int 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> * item, int row, int 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> * 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> * layout, int row, int 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#x1273">listbox/listbox.cpp</a>, <a href="progressbar-example.html#x980">progressbar/progressbar.cpp</a>, <a href="tutorial1-10.html#x2296">t10/main.cpp</a>, and <a href="tutorial1-13.html#x2344">t13/gamebrd.cpp</a>. <h3 class=fn>void <a name="addMultiCell"></a>QGridLayout::addMultiCell ( <a href="qlayoutitem.html">QLayoutItem</a> * item, int fromRow, int toRow, int fromCol, int toCol, int 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 <a href="qt.html#AlignmentFlags-enum">Qt::AlignmentFlags</a> 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> * layout, int fromRow, int toRow, int fromCol, int toCol, int 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 <a href="qt.html#AlignmentFlags-enum">Qt::AlignmentFlags</a> 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> * w, int fromRow, int toRow, int fromCol, int toCol, int 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 <a href="qt.html#AlignmentFlags-enum">Qt::AlignmentFlags</a> 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#x911">cursor/cursor.cpp</a>, <a href="layout-example.html#x499">layout/layout.cpp</a>, and <a href="progressbar-example.html#x981">progressbar/progressbar.cpp</a>. <h3 class=fn>void <a name="addRowSpacing"></a>QGridLayout::addRowSpacing ( int row, int 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> * w, int row, int col, int 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 <a href="qt.html#AlignmentFlags-enum">Qt::AlignmentFlags</a> 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> From Qt 3.0, 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#x545">addressbook/centralwidget.cpp</a>, <a href="layout-example.html#x500">layout/layout.cpp</a>, <a href="rot-example.html#x1480">rot13/rot13.cpp</a>, <a href="sql.html#x2151">sql/overview/form1/main.cpp</a>, <a href="sql.html#x2160">sql/overview/form2/main.cpp</a>, <a href="tutorial1-14.html#x2372">t14/gamebrd.cpp</a>, and <a href="tutorial1-08.html#x2268">t8/main.cpp</a>. <h3 class=fn><a href="qrect.html">QRect</a> <a name="cellGeometry"></a>QGridLayout::cellGeometry ( int row, int 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. <h3 class=fn>int <a name="colStretch"></a>QGridLayout::colStretch ( int col ) const </h3> Returns the <a href="layout.html#stretch-factor">stretch factor</a> for column <em>col</em>. <p> <p>See also <a href="#setColStretch">setColStretch</a>(). <h3 class=fn>void <a name="expand"></a>QGridLayout::expand ( int nRows, int 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 whether this layout can make use of more space than <a href="#sizeHint">sizeHint</a>(). A value of <a href="qt.html#Orientation-enum">Vertical</a> or <a href="qt.html#Orientation-enum">Horizontal</a> means that it wants to grow in only one dimension, whereas <tt>BothDirections</tt> means that it wants to grow in both dimensions. <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> * w, int * row, int * 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>*<em>row</em></tt> and <tt>*<em>col</em></tt> to the row and column and returns TRUE; otherwise returns FALSE. <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 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 the corner that's used for the grid's origin, i.e. for position (0, 0). <h3 class=fn>int <a name="rowStretch"></a>QGridLayout::rowStretch ( int row ) const </h3> Returns the <a href="layout.html#stretch-factor">stretch factor</a> for row <em>row</em>. <p> <p>See also <a href="#setRowStretch">setRowStretch</a>(). <h3 class=fn>void <a name="setColStretch"></a>QGridLayout::setColStretch ( int col, int 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#x501">layout/layout.cpp</a>, <a href="tutorial1-14.html#x2373">t14/gamebrd.cpp</a>, and <a href="tutorial1-08.html#x2269">t8/main.cpp</a>. <h3 class=fn>void <a name="setGeometry"></a>QGridLayout::setGeometry ( const <a href="qrect.html">QRect</a> & 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> c ) </h3> Sets the grid's origin corner, i.e. position (0, 0), to <em>c</em>. <h3 class=fn>void <a name="setRowStretch"></a>QGridLayout::setRowStretch ( int row, int 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#x546">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 © 1995-2002 <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 © 2002 <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.1.1</div> </table></div></address></body> </html>