<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/kernel/qlayout.cpp:884 --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>TQGridLayout Class</title> <style type="text/css"><!-- 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>TQGridLayout Class Reference</h1> <p>The TQGridLayout class lays out widgets in a grid. <a href="#details">More...</a> <p><tt>#include <<a href="qlayout-h.html">ntqlayout.h</a>></tt> <p>Inherits <a href="ntqlayout.html">TQLayout</a>. <p><a href="qgridlayout-members.html">List of all member functions.</a> <h2>Public Members</h2> <ul> <li class=fn><a href="#TQGridLayout"><b>TQGridLayout</b></a> ( TQWidget * parent, int nRows = 1, int nCols = 1, int margin = 0, int space = -1, const char * name = 0 )</li> <li class=fn><a href="#TQGridLayout-2"><b>TQGridLayout</b></a> ( int nRows = 1, int nCols = 1, int spacing = -1, const char * name = 0 )</li> <li class=fn><a href="#TQGridLayout-3"><b>TQGridLayout</b></a> ( TQLayout * parentLayout, int nRows = 1, int nCols = 1, int spacing = -1, const char * name = 0 )</li> <li class=fn><a href="#~TQGridLayout"><b>~TQGridLayout</b></a> ()</li> <li class=fn>virtual TQSize <a href="#sizeHint"><b>sizeHint</b></a> () const</li> <li class=fn>virtual TQSize <a href="#minimumSize"><b>minimumSize</b></a> () const</li> <li class=fn>virtual TQSize <a href="#maximumSize"><b>maximumSize</b></a> () const</li> <li class=fn>virtual void <a href="#setRowStretch"><b>setRowStretch</b></a> ( int row, int stretch )</li> <li class=fn>virtual void <a href="#setColStretch"><b>setColStretch</b></a> ( int col, int stretch )</li> <li class=fn>int <a href="#rowStretch"><b>rowStretch</b></a> ( int row ) const</li> <li class=fn>int <a href="#colStretch"><b>colStretch</b></a> ( int col ) const</li> <li class=fn>void <a href="#setRowSpacing"><b>setRowSpacing</b></a> ( int row, int minSize )</li> <li class=fn>void <a href="#setColSpacing"><b>setColSpacing</b></a> ( int col, int minSize )</li> <li class=fn>int <a href="#rowSpacing"><b>rowSpacing</b></a> ( int row ) const</li> <li class=fn>int <a href="#colSpacing"><b>colSpacing</b></a> ( int col ) const</li> <li class=fn>int <a href="#numRows"><b>numRows</b></a> () const</li> <li class=fn>int <a href="#numCols"><b>numCols</b></a> () const</li> <li class=fn>TQRect <a href="#cellGeometry"><b>cellGeometry</b></a> ( int row, int col ) const</li> <li class=fn>virtual bool <a href="#hasHeightForWidth"><b>hasHeightForWidth</b></a> () const</li> <li class=fn>virtual int <a href="#heightForWidth"><b>heightForWidth</b></a> ( int w ) const</li> <li class=fn>virtual TQSizePolicy::ExpandData <a href="#expanding"><b>expanding</b></a> () const</li> <li class=fn>virtual void <a href="#invalidate"><b>invalidate</b></a> ()</li> <li class=fn>virtual void <a href="#addItem-2"><b>addItem</b></a> ( TQLayoutItem * item )</li> <li class=fn>void <a href="#addItem"><b>addItem</b></a> ( TQLayoutItem * item, int row, int col )</li> <li class=fn>void <a href="#addMultiCell"><b>addMultiCell</b></a> ( TQLayoutItem * item, int fromRow, int toRow, int fromCol, int toCol, int alignment = 0 )</li> <li class=fn>void <a href="#addWidget"><b>addWidget</b></a> ( TQWidget * w, int row, int col, int alignment = 0 )</li> <li class=fn>void <a href="#addMultiCellWidget"><b>addMultiCellWidget</b></a> ( TQWidget * w, int fromRow, int toRow, int fromCol, int toCol, int alignment = 0 )</li> <li class=fn>void <a href="#addLayout"><b>addLayout</b></a> ( TQLayout * layout, int row, int col )</li> <li class=fn>void <a href="#addMultiCellLayout"><b>addMultiCellLayout</b></a> ( TQLayout * layout, int fromRow, int toRow, int fromCol, int toCol, int alignment = 0 )</li> <li class=fn>void addRowSpacing ( int row, int minsize ) <em>(obsolete)</em></li> <li class=fn>void addColSpacing ( int col, int minsize ) <em>(obsolete)</em></li> <li class=fn>void <a href="#expand"><b>expand</b></a> ( int nRows, int nCols )</li> <li class=fn>enum <a href="#Corner-enum"><b>Corner</b></a> { TopLeft, TopRight, BottomLeft, BottomRight }</li> <li class=fn>void <a href="#setOrigin"><b>setOrigin</b></a> ( Corner c )</li> <li class=fn>Corner <a href="#origin"><b>origin</b></a> () const</li> <li class=fn>virtual void <a href="#setGeometry"><b>setGeometry</b></a> ( const TQRect & r )</li> </ul> <h2>Protected Members</h2> <ul> <li class=fn>bool <a href="#findWidget"><b>findWidget</b></a> ( TQWidget * w, int * row, int * col )</li> <li class=fn>void <a href="#add"><b>add</b></a> ( TQLayoutItem * item, int row, int col )</li> </ul> <hr><a name="details"></a><h2>Detailed Description</h2> <p> The TQGridLayout class lays out widgets in a grid. <p> <p> TQGridLayout takes the space made available to it (by its parent layout or by the <a href="ntqlayout.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="ntqlayout.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, TQGridLayout 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 <a href="ntqlayout.html#remove">remove</a>(). Calling <a href="ntqwidget.html#hide">TQWidget::hide</a>() on a widget also effectively removes the widget from the layout until <a href="ntqwidget.html#show">TQWidget::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="ntqlabel.html">TQLabel</a>, a <a href="ntqlineedit.html">TQLineEdit</a>, and a <a href="ntqlistbox.html">TQListBox</a>. Columns 1 and 3 are placeholders made with <a href="#addColSpacing">addColSpacing</a>(). Row 0 consists of three TQLabel objects, row 1 of three TQLineEdit objects and row 2 of three TQListBox 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 TQGridLayout 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> TQGridLayout also includes two margin widths: the border and the spacing. The border is the width of the reserved space along each of the TQGridLayout'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="ntqgrid.html">TQGrid</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>TQGridLayout::Corner</h3> <p> This enum identifies which corner is the origin (0, 0) of the layout. <ul> <li><tt>TQGridLayout::TopLeft</tt> - the top-left corner <li><tt>TQGridLayout::TopRight</tt> - the top-right corner <li><tt>TQGridLayout::BottomLeft</tt> - the bottom-left corner <li><tt>TQGridLayout::BottomRight</tt> - the bottom-right corner </ul> <hr><h2>Member Function Documentation</h2> <h3 class=fn><a name="TQGridLayout"></a>TQGridLayout::TQGridLayout ( <a href="ntqwidget.html">TQWidget</a> * parent, int nRows = 1, int nCols = 1, int margin = 0, int space = -1, const char * name = 0 ) </h3> Constructs a new TQGridLayout 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="TQGridLayout-2"></a>TQGridLayout::TQGridLayout ( 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 TQGridLayout inherits its parent's <a href="ntqlayout.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="TQGridLayout-3"></a>TQGridLayout::TQGridLayout ( <a href="ntqlayout.html">TQLayout</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 TQGridLayout inherits its parent's <a href="ntqlayout.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="~TQGridLayout"></a>TQGridLayout::~TQGridLayout () </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>TQGridLayout::add ( <a href="qlayoutitem.html">TQLayoutItem</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>TQGridLayout::addColSpacing ( int col, int minsize ) </h3> <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. <p> Sets the minimum width of column <em>col</em> to <em>minsize</em> pixels. <p> Use <a href="#setColSpacing">setColSpacing</a>() instead. <h3 class=fn>void <a name="addItem"></a>TQGridLayout::addItem ( <a href="qlayoutitem.html">TQLayoutItem</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>TQGridLayout::addItem ( <a href="qlayoutitem.html">TQLayoutItem</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="ntqlayout.html#addItem">TQLayout</a>. <h3 class=fn>void <a name="addLayout"></a>TQGridLayout::addLayout ( <a href="ntqlayout.html">TQLayout</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> <em>layout</em> becomes a child of the grid layout. <p> When a layout is constructed with another layout as its parent, you don't need to call <a href="#addLayout">addLayout</a>(); the child layout is automatically added to the parent layout as it is constructed. <p> <p>See also <a href="#addMultiCellLayout">addMultiCellLayout</a>(). <p>Examples: <a href="listbox-example.html#x1430">listbox/listbox.cpp</a>, <a href="progressbar-example.html#x964">progressbar/progressbar.cpp</a>, <a href="tutorial1-10.html#x2365">t10/main.cpp</a>, and <a href="tutorial1-13.html#x2413">t13/gamebrd.cpp</a>. <h3 class=fn>void <a name="addMultiCell"></a>TQGridLayout::addMultiCell ( <a href="qlayoutitem.html">TQLayoutItem</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="ntqt.html#AlignmentFlags-enum">TQt::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>TQGridLayout::addMultiCellLayout ( <a href="ntqlayout.html">TQLayout</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="ntqt.html#AlignmentFlags-enum">TQt::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>(). <p> <em>layout</em> becomes a child of the grid layout. <p> <p>See also <a href="#addLayout">addLayout</a>(). <h3 class=fn>void <a name="addMultiCellWidget"></a>TQGridLayout::addMultiCellWidget ( <a href="ntqwidget.html">TQWidget</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="ntqt.html#AlignmentFlags-enum">TQt::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> <p>See also <a href="#addWidget">addWidget</a>(). <p>Examples: <a href="cursor-example.html#x1116">cursor/cursor.cpp</a>, <a href="layout-example.html#x532">layout/layout.cpp</a>, and <a href="progressbar-example.html#x965">progressbar/progressbar.cpp</a>. <h3 class=fn>void <a name="addRowSpacing"></a>TQGridLayout::addRowSpacing ( int row, int minsize ) </h3> <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code. <p> Sets the minimum height of row <em>row</em> to <em>minsize</em> pixels. <p> Use <a href="#setRowSpacing">setRowSpacing</a>() instead. <h3 class=fn>void <a name="addWidget"></a>TQGridLayout::addWidget ( <a href="ntqwidget.html">TQWidget</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="ntqt.html#AlignmentFlags-enum">TQt::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="ntqlayout.html#setAutoAdd">auto-add facility of the layout</a>. <p> <li> From TQt 3.0, the <em>alignment</em> parameter is interpreted more aggressively than in previous versions of TQt. 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> <p>See also <a href="#addMultiCellWidget">addMultiCellWidget</a>(). <p>Examples: <a href="addressbook-example.html#x578">addressbook/centralwidget.cpp</a>, <a href="layout-example.html#x533">layout/layout.cpp</a>, <a href="rot-example.html#x1370">rot13/rot13.cpp</a>, <a href="sql.html#x2221">sql/overview/form1/main.cpp</a>, <a href="sql.html#x2230">sql/overview/form2/main.cpp</a>, <a href="tutorial1-14.html#x2441">t14/gamebrd.cpp</a>, and <a href="tutorial1-08.html#x2337">t8/main.cpp</a>. <h3 class=fn><a href="ntqrect.html">TQRect</a> <a name="cellGeometry"></a>TQGridLayout::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 TQt this function does not return valid results until <a href="#setGeometry">setGeometry</a>() has been called, i.e. after the <a href="ntqlayout.html#mainWidget">mainWidget</a>() is visible. <h3 class=fn>int <a name="colSpacing"></a>TQGridLayout::colSpacing ( int col ) const </h3> Returns the column spacing for column <em>col</em>. <p> <p>See also <a href="#setColSpacing">setColSpacing</a>(). <h3 class=fn>int <a name="colStretch"></a>TQGridLayout::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>TQGridLayout::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 TQGridLayout expands automatically as new items are inserted. <h3 class=fn><a href="ntqsizepolicy.html#ExpandData-enum">TQSizePolicy::ExpandData</a> <a name="expanding"></a>TQGridLayout::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="ntqt.html#Orientation-enum">Vertical</a> or <a href="ntqt.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="ntqlayout.html#expanding">TQLayout</a>. <h3 class=fn>bool <a name="findWidget"></a>TQGridLayout::findWidget ( <a href="ntqwidget.html">TQWidget</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>TQGridLayout::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">TQLayoutItem</a>. <h3 class=fn>int <a name="heightForWidth"></a>TQGridLayout::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">TQLayoutItem</a>. <h3 class=fn>void <a name="invalidate"></a>TQGridLayout::invalidate ()<tt> [virtual]</tt> </h3> Resets cached information. <p>Reimplemented from <a href="ntqlayout.html#invalidate">TQLayout</a>. <h3 class=fn><a href="ntqsize.html">TQSize</a> <a name="maximumSize"></a>TQGridLayout::maximumSize () const<tt> [virtual]</tt> </h3> Returns the maximum size needed by this grid. <p>Reimplemented from <a href="ntqlayout.html#maximumSize">TQLayout</a>. <h3 class=fn><a href="ntqsize.html">TQSize</a> <a name="minimumSize"></a>TQGridLayout::minimumSize () const<tt> [virtual]</tt> </h3> Returns the minimum size needed by this grid. <p>Reimplemented from <a href="ntqlayout.html#minimumSize">TQLayout</a>. <h3 class=fn>int <a name="numCols"></a>TQGridLayout::numCols () const </h3> Returns the number of columns in this grid. <h3 class=fn>int <a name="numRows"></a>TQGridLayout::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>TQGridLayout::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="rowSpacing"></a>TQGridLayout::rowSpacing ( int row ) const </h3> Returns the row spacing for row <em>row</em>. <p> <p>See also <a href="#setRowSpacing">setRowSpacing</a>(). <h3 class=fn>int <a name="rowStretch"></a>TQGridLayout::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="setColSpacing"></a>TQGridLayout::setColSpacing ( int col, int minSize ) </h3> Sets the minimum width of column <em>col</em> to <em>minSize</em> pixels. <p> <p>See also <a href="#colSpacing">colSpacing</a>() and <a href="#setRowSpacing">setRowSpacing</a>(). <h3 class=fn>void <a name="setColStretch"></a>TQGridLayout::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#x534">layout/layout.cpp</a>, <a href="tutorial1-14.html#x2442">t14/gamebrd.cpp</a>, and <a href="tutorial1-08.html#x2338">t8/main.cpp</a>. <h3 class=fn>void <a name="setGeometry"></a>TQGridLayout::setGeometry ( const <a href="ntqrect.html">TQRect</a> & r )<tt> [virtual]</tt> </h3> Resizes managed widgets within the rectangle <em>r</em>. <p>Reimplemented from <a href="ntqlayout.html#setGeometry">TQLayout</a>. <h3 class=fn>void <a name="setOrigin"></a>TQGridLayout::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="setRowSpacing"></a>TQGridLayout::setRowSpacing ( int row, int minSize ) </h3> Sets the minimum height of row <em>row</em> to <em>minSize</em> pixels. <p> <p>See also <a href="#rowSpacing">rowSpacing</a>() and <a href="#setColSpacing">setColSpacing</a>(). <h3 class=fn>void <a name="setRowStretch"></a>TQGridLayout::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="#setRowSpacing">setRowSpacing</a>(), and <a href="#setColStretch">setColStretch</a>(). <p>Examples: <a href="addressbook-example.html#x579">addressbook/centralwidget.cpp</a> and <a href="qaxcontainer-example-qutlook.html#x2722">qutlook/centralwidget.cpp</a>. <h3 class=fn><a href="ntqsize.html">TQSize</a> <a name="sizeHint"></a>TQGridLayout::sizeHint () const<tt> [virtual]</tt> </h3> Returns the preferred size of this grid. <p>Reimplemented from <a href="qlayoutitem.html#sizeHint">TQLayoutItem</a>. <!-- eof --> <hr><p> This file is part of the <a href="index.html">TQt toolkit</a>. Copyright © 1995-2007 <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 © 2007 <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a> <td align=right><div align=right>TQt 3.3.8</div> </table></div></address></body> </html>