~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/qgridlayout.html

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1"?>
 
2
<!DOCTYPE html
 
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/gui/kernel/qgridlayout.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: QGridLayout Class Reference</title>
 
8
    <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
 
9
a:link { color: #004faf; text-decoration: none }
 
10
a:visited { color: #672967; text-decoration: none }
 
11
td.postheader { font-family: sans-serif }
 
12
tr.address { font-family: sans-serif }
 
13
body { background: #ffffff; color: black; }</style>
 
14
</head>
 
15
<body>
 
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 
17
<tr>
 
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
 
19
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="annotated.html"><font color="#004faf">Annotated</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
 
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">QGridLayout Class Reference</h1>
 
21
<p>The QGridLayout class lays out widgets in a grid. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;QGridLayout&gt;</pre><p>Part of the <a href="qtgui.html">QtGui</a> module.</p>
 
23
<p>Inherits <a href="qlayout.html">QLayout</a>.</p>
 
24
<ul>
 
25
<li><a href="qgridlayout-members.html">List of all members, including inherited members</a></li>
 
26
<li><a href="qgridlayout-qt3.html">Qt 3 support members</a></li>
 
27
</ul>
 
28
<a name="public-functions"></a>
 
29
<h3>Public Functions</h3>
 
30
<ul>
 
31
<li><div class="fn"/><b><a href="qgridlayout.html#QGridLayout">QGridLayout</a></b> ( QWidget * <i>parent</i> )</li>
 
32
<li><div class="fn"/><b><a href="qgridlayout.html#QGridLayout-2">QGridLayout</a></b> ()</li>
 
33
<li><div class="fn"/><b><a href="qgridlayout.html#dtor.QGridLayout">~QGridLayout</a></b> ()</li>
 
34
<li><div class="fn"/>void <b><a href="qgridlayout.html#addItem">addItem</a></b> ( QLayoutItem * <i>item</i>, int <i>row</i>, int <i>column</i>, int <i>rowSpan</i> = 1, int <i>columnSpan</i> = 1, Qt::Alignment <i>alignment</i> = 0 )</li>
 
35
<li><div class="fn"/>void <b><a href="qgridlayout.html#addLayout">addLayout</a></b> ( QLayout * <i>layout</i>, int <i>row</i>, int <i>column</i>, Qt::Alignment <i>alignment</i> = 0 )</li>
 
36
<li><div class="fn"/>void <b><a href="qgridlayout.html#addLayout-2">addLayout</a></b> ( QLayout * <i>layout</i>, int <i>row</i>, int <i>column</i>, int <i>rowSpan</i>, int <i>columnSpan</i>, Qt::Alignment <i>alignment</i> = 0 )</li>
 
37
<li><div class="fn"/>void <b><a href="qgridlayout.html#addWidget-2">addWidget</a></b> ( QWidget * <i>widget</i>, int <i>row</i>, int <i>column</i>, Qt::Alignment <i>alignment</i> = 0 )</li>
 
38
<li><div class="fn"/>void <b><a href="qgridlayout.html#addWidget-3">addWidget</a></b> ( QWidget * <i>widget</i>, int <i>fromRow</i>, int <i>fromColumn</i>, int <i>rowSpan</i>, int <i>columnSpan</i>, Qt::Alignment <i>alignment</i> = 0 )</li>
 
39
<li><div class="fn"/>QRect <b><a href="qgridlayout.html#cellRect">cellRect</a></b> ( int <i>row</i>, int <i>column</i> ) const</li>
 
40
<li><div class="fn"/>int <b><a href="qgridlayout.html#columnCount">columnCount</a></b> () const</li>
 
41
<li><div class="fn"/>int <b><a href="qgridlayout.html#columnMinimumWidth">columnMinimumWidth</a></b> ( int <i>column</i> ) const</li>
 
42
<li><div class="fn"/>int <b><a href="qgridlayout.html#columnStretch">columnStretch</a></b> ( int <i>column</i> ) const</li>
 
43
<li><div class="fn"/>virtual Qt::Orientations <b><a href="qgridlayout.html#expandingDirections">expandingDirections</a></b> () const</li>
 
44
<li><div class="fn"/>void <b><a href="qgridlayout.html#getItemPosition">getItemPosition</a></b> ( int <i>index</i>, int * <i>row</i>, int * <i>column</i>, int * <i>rowSpan</i>, int * <i>columnSpan</i> )</li>
 
45
<li><div class="fn"/>virtual bool <b><a href="qgridlayout.html#hasHeightForWidth">hasHeightForWidth</a></b> () const</li>
 
46
<li><div class="fn"/>virtual int <b><a href="qgridlayout.html#heightForWidth">heightForWidth</a></b> ( int <i>w</i> ) const</li>
 
47
<li><div class="fn"/>virtual void <b><a href="qgridlayout.html#invalidate">invalidate</a></b> ()</li>
 
48
<li><div class="fn"/>virtual QSize <b><a href="qgridlayout.html#maximumSize">maximumSize</a></b> () const</li>
 
49
<li><div class="fn"/>virtual QSize <b><a href="qgridlayout.html#minimumSize">minimumSize</a></b> () const</li>
 
50
<li><div class="fn"/>Qt::Corner <b><a href="qgridlayout.html#originCorner">originCorner</a></b> () const</li>
 
51
<li><div class="fn"/>int <b><a href="qgridlayout.html#rowCount">rowCount</a></b> () const</li>
 
52
<li><div class="fn"/>int <b><a href="qgridlayout.html#rowMinimumHeight">rowMinimumHeight</a></b> ( int <i>row</i> ) const</li>
 
53
<li><div class="fn"/>int <b><a href="qgridlayout.html#rowStretch">rowStretch</a></b> ( int <i>row</i> ) const</li>
 
54
<li><div class="fn"/>void <b><a href="qgridlayout.html#setColumnMinimumWidth">setColumnMinimumWidth</a></b> ( int <i>column</i>, int <i>minSize</i> )</li>
 
55
<li><div class="fn"/>void <b><a href="qgridlayout.html#setColumnStretch">setColumnStretch</a></b> ( int <i>column</i>, int <i>stretch</i> )</li>
 
56
<li><div class="fn"/>virtual void <b><a href="qgridlayout.html#setGeometry">setGeometry</a></b> ( const QRect &amp; <i>rect</i> )</li>
 
57
<li><div class="fn"/>void <b><a href="qgridlayout.html#setOriginCorner">setOriginCorner</a></b> ( Qt::Corner <i>corner</i> )</li>
 
58
<li><div class="fn"/>void <b><a href="qgridlayout.html#setRowMinimumHeight">setRowMinimumHeight</a></b> ( int <i>row</i>, int <i>minSize</i> )</li>
 
59
<li><div class="fn"/>void <b><a href="qgridlayout.html#setRowStretch">setRowStretch</a></b> ( int <i>row</i>, int <i>stretch</i> )</li>
 
60
<li><div class="fn"/>virtual QSize <b><a href="qgridlayout.html#sizeHint">sizeHint</a></b> () const</li>
 
61
</ul>
 
62
<ul>
 
63
<li><div class="fn"/>29 public functions inherited from <a href="qlayout.html#public-functions">QLayout</a></li>
 
64
<li><div class="fn"/>28 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
 
65
<li><div class="fn"/>16 public functions inherited from <a href="qlayoutitem.html#public-functions">QLayoutItem</a></li>
 
66
</ul>
 
67
<a name="protected-functions"></a>
 
68
<h3>Protected Functions</h3>
 
69
<ul>
 
70
<li><div class="fn"/>virtual void <b><a href="qgridlayout.html#addItem-2">addItem</a></b> ( QLayoutItem * <i>item</i> )</li>
 
71
</ul>
 
72
<ul>
 
73
<li><div class="fn"/>3 protected functions inherited from <a href="qlayout.html#protected-functions">QLayout</a></li>
 
74
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
 
75
</ul>
 
76
<h3>Additional Inherited Members</h3>
 
77
<ul>
 
78
<li><div class="fn"/>3 properties inherited from <a href="qlayout.html#properties">QLayout</a></li>
 
79
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
 
80
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
 
81
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
 
82
<li><div class="fn"/>1 static public member inherited from <a href="qlayout.html#static-public-members">QLayout</a></li>
 
83
<li><div class="fn"/>4 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
 
84
</ul>
 
85
<a name="details"></a>
 
86
<hr />
 
87
<h2>Detailed Description</h2>
 
88
<p>The QGridLayout class lays out widgets in a grid.</p>
 
89
<p>QGridLayout takes the space made available to it (by its parent layout or by the <a href="qlayout.html#parentWidget">parentWidget</a>()), divides it up into rows and columns, and puts each widget it manages into the correct cell.</p>
 
90
<p>Columns and rows behave identically; we will discuss columns, but there are equivalent functions for rows.</p>
 
91
<p>Each column has a minimum width and a stretch factor. The minimum width is the greatest of that set using <a href="qgridlayout.html#setColumnMinimumWidth">setColumnMinimumWidth</a>() and the minimum width of each widget in that column. The stretch factor is set using <a href="qgridlayout.html#setColumnStretch">setColumnStretch</a>() and determines how much of the available space the column will get over and above its necessary minimum.</p>
 
92
<p>Normally, each managed widget or layout is put into a cell of its own using <a href="qgridlayout.html#addWidget">addWidget</a>(). It is also possible for a widget to occupy multiple cells using the row and column spanning overloads of <a href="qgridlayout.html#addItem">addItem</a>() and <a href="qgridlayout.html#addWidget">addWidget</a>(). If you do this, QGridLayout will guess how to distribute the size over the columns/rows (based on the stretch factors).</p>
 
93
<p>To remove a widget from a layout, call <a href="qlayout-qt3.html#remove">remove</a>(). 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>
 
94
<p>This illustration shows a fragment of a dialog with a five-column, three-row grid (the grid is shown overlaid in magenta):</p>
 
95
<center><img src="images/gridlayout.png" alt="A grid layout" /></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="porting4.html#qlistbox">QListBox</a>. Columns 1 and 3 are placeholders made with <a href="qgridlayout.html#setColumnMinimumWidth">setColumnMinimumWidth</a>(). Row 0 consists of three <a href="qlabel.html">QLabel</a> objects, row 1 of three <a href="qlineedit.html">QLineEdit</a> objects and row 2 of three <a href="porting4.html#qlistbox">QListBox</a> objects. We used placeholder columns (1 and 3) to get the right amount of space between the columns.</p>
 
96
<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 <a href="qgridlayout.html#setColumnMinimumWidth">setColumnMinimumWidth</a>() and <a href="qgridlayout.html#setColumnStretch">setColumnStretch</a>().</p>
 
97
<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 <a href="qgridlayout.html#addLayout">addLayout</a>() on the parent layout.</p>
 
98
<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="qgridlayout.html#addWidget">addWidget</a>(), <a href="qgridlayout.html#addItem">addItem</a>(), and <a href="qgridlayout.html#addLayout">addLayout</a>().</p>
 
99
<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>
 
100
<p>Both the border and the spacing are parameters of the constructor and default to 0.</p>
 
101
<p>See also <a href="qboxlayout.html">QBoxLayout</a>, <a href="qstackedlayout.html">QStackedLayout</a>, and <a href="layout.html">Layout Classes</a>.</p>
 
102
<hr />
 
103
<h2>Member Function Documentation</h2>
 
104
<h3 class="fn"><a name="QGridLayout"></a>QGridLayout::QGridLayout ( <a href="qwidget.html">QWidget</a> * <i>parent</i> )</h3>
 
105
<p>Constructs a new <a href="qgridlayout.html">QGridLayout</a> with parent widget, <i>parent</i>. The layout has one row and one column initially, and will expand when new items are inserted.</p>
 
106
<h3 class="fn"><a name="QGridLayout-2"></a>QGridLayout::QGridLayout ()</h3>
 
107
<p>Constructs a new grid layout.</p>
 
108
<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.</p>
 
109
<h3 class="fn"><a name="dtor.QGridLayout"></a>QGridLayout::~QGridLayout ()</h3>
 
110
<p>Destroys the grid layout. Geometry management is terminated if this is a top-level grid.</p>
 
111
<p>The layout's widgets aren't destroyed.</p>
 
112
<h3 class="fn"><a name="addItem"></a>void QGridLayout::addItem ( <a href="qlayoutitem.html">QLayoutItem</a> * <i>item</i>, int <i>row</i>, int <i>column</i>, int <i>rowSpan</i> = 1, int <i>columnSpan</i> = 1, <a href="qt.html#AlignmentFlag-enum">Qt::Alignment</a> <i>alignment</i> = 0 )</h3>
 
113
<p>Adds <i>item</i> at position <i>row</i>, <i>column</i>, spanning <i>rowSpan</i> rows and <i>columnSpan</i> columns, and aligns it according to <i>alignment</i>. If <i>rowSpan</i> and/or <i>columnSpan</i> is -1, then the item will extend to the bottom and/or right edge, respectively. The layout takes ownership of the <i>item</i>.</p>
 
114
<p><b>Warning:</b> Do not use this function to add child layouts or child widget items. Use <a href="qgridlayout.html#addLayout">addLayout</a>() or <a href="qgridlayout.html#addWidget">addWidget</a>() instead.</p>
 
115
<h3 class="fn"><a name="addItem-2"></a>void QGridLayout::addItem ( <a href="qlayoutitem.html">QLayoutItem</a> * <i>item</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
116
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
117
<p>Adds <i>item</i> to the next free position of this layout.</p>
 
118
<p>Reimplemented from <a href="qlayout.html#addItem">QLayout</a>.</p>
 
119
<h3 class="fn"><a name="addLayout"></a>void QGridLayout::addLayout ( <a href="qlayout.html">QLayout</a> * <i>layout</i>, int <i>row</i>, int <i>column</i>, <a href="qt.html#AlignmentFlag-enum">Qt::Alignment</a> <i>alignment</i> = 0 )</h3>
 
120
<p>Places the <i>layout</i> at position (<i>row</i>, <i>column</i>) in the grid. The top-left position is (0, 0).</p>
 
121
<p>The alignment is specified by <i>alignment</i>. The default alignment is 0, which means that the widget fills the entire cell.</p>
 
122
<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="qgridlayout.html#sizeHint">sizeHint</a>().</p>
 
123
<p><i>layout</i> becomes a child of the grid layout.</p>
 
124
<h3 class="fn"><a name="addLayout-2"></a>void QGridLayout::addLayout ( <a href="qlayout.html">QLayout</a> * <i>layout</i>, int <i>row</i>, int <i>column</i>, int <i>rowSpan</i>, int <i>columnSpan</i>, <a href="qt.html#AlignmentFlag-enum">Qt::Alignment</a> <i>alignment</i> = 0 )</h3>
 
125
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
126
<p>This version adds the layout <i>layout</i> to the cell grid, spanning multiple rows/columns. The cell will start at <i>row</i>, <i>column</i> spanning <i>rowSpan</i> rows and <i>columnSpan</i> columns.</p>
 
127
<p>If <i>rowSpan</i> and/or <i>columnSpan</i> is -1, then the layout will extend to the bottom and/or right edge, respectively.</p>
 
128
<h3 class="fn"><a name="addWidget-2"></a>void QGridLayout::addWidget ( <a href="qwidget.html">QWidget</a> * <i>widget</i>, int <i>row</i>, int <i>column</i>, <a href="qt.html#AlignmentFlag-enum">Qt::Alignment</a> <i>alignment</i> = 0 )</h3>
 
129
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
130
<p>Adds the given <i>widget</i> to the cell grid at <i>row</i>, <i>column</i>. The top-left position is (0, 0) by default.</p>
 
131
<p>The alignment is specified by <i>alignment</i>. The default alignment is 0, which means that the widget fills the entire cell.</p>
 
132
<h3 class="fn"><a name="addWidget-3"></a>void QGridLayout::addWidget ( <a href="qwidget.html">QWidget</a> * <i>widget</i>, int <i>fromRow</i>, int <i>fromColumn</i>, int <i>rowSpan</i>, int <i>columnSpan</i>, <a href="qt.html#AlignmentFlag-enum">Qt::Alignment</a> <i>alignment</i> = 0 )</h3>
 
133
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
134
<p>This version adds the given <i>widget</i> to the cell grid, spanning multiple rows/columns. The cell will start at <i>fromRow</i>, <i>fromColumn</i> spanning <i>rowSpan</i> rows and <i>columnSpan</i> columns. The grid will have the given <i>alignment</i>.</p>
 
135
<p>If <i>rowSpan</i> and/or <i>columnSpan</i> is -1, then the widget will extend to the bottom and/or right edge, respectively.</p>
 
136
<h3 class="fn"><a name="cellRect"></a><a href="qrect.html">QRect</a> QGridLayout::cellRect ( int <i>row</i>, int <i>column</i> ) const</h3>
 
137
<p>Returns the geometry of the cell with row <i>row</i> and column <i>column</i> in the grid. Returns an invalid rectangle if <i>row</i> or <i>column</i> is outside the grid.</p>
 
138
<p><b>Warning:</b> in the current version of Qt this function does not return valid results until <a href="qgridlayout.html#setGeometry">setGeometry</a>() has been called, i.e. after the <a href="qlayout.html#parentWidget">parentWidget</a>() is visible.</p>
 
139
<h3 class="fn"><a name="columnCount"></a>int QGridLayout::columnCount () const</h3>
 
140
<p>Returns the number of columns in this grid.</p>
 
141
<h3 class="fn"><a name="columnMinimumWidth"></a>int QGridLayout::columnMinimumWidth ( int <i>column</i> ) const</h3>
 
142
<p>Returns the column spacing for column <i>column</i>.</p>
 
143
<p>See also <a href="qgridlayout.html#setColumnMinimumWidth">setColumnMinimumWidth</a>().</p>
 
144
<h3 class="fn"><a name="columnStretch"></a>int QGridLayout::columnStretch ( int <i>column</i> ) const</h3>
 
145
<p>Returns the stretch factor for column <i>column</i>.</p>
 
146
<p>See also <a href="qgridlayout.html#setColumnStretch">setColumnStretch</a>().</p>
 
147
<h3 class="fn"><a name="expandingDirections"></a><a href="qt.html#Orientation-enum">Qt::Orientations</a> QGridLayout::expandingDirections () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
148
<p>Returns whether this layout can make use of more space than <a href="qgridlayout.html#sizeHint">sizeHint</a>(). A value of <tt>Qt::Vertical</tt> or <tt>Qt::Horizontal</tt> means that it wants to grow in only one dimension, whereas <tt>BothDirections</tt> means that it wants to grow in both dimensions.</p>
 
149
<p>Reimplemented from <a href="qlayoutitem.html#expandingDirections">QLayoutItem</a>.</p>
 
150
<h3 class="fn"><a name="getItemPosition"></a>void QGridLayout::getItemPosition ( int <i>index</i>, int * <i>row</i>, int * <i>column</i>, int * <i>rowSpan</i>, int * <i>columnSpan</i> )</h3>
 
151
<p>Returns the position information of the item with the given <i>index</i>.</p>
 
152
<p>The variables passed as <i>row</i> and <i>column</i> are updated with the position of the item in the layout, and the <i>rowSpan</i> and <i>columnSpan</i> variables are updated with the vertical and horizontal spans of the item.</p>
 
153
<h3 class="fn"><a name="hasHeightForWidth"></a>bool QGridLayout::hasHeightForWidth () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
154
<p>Returns true if this layout's preferred height depends on its width; otherwise returns false.</p>
 
155
<p>Reimplemented from <a href="qlayoutitem.html#hasHeightForWidth">QLayoutItem</a>.</p>
 
156
<h3 class="fn"><a name="heightForWidth"></a>int QGridLayout::heightForWidth ( int <i>w</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
157
<p>Returns the layout's preferred height when it is <i>w</i> pixels wide.</p>
 
158
<p>Reimplemented from <a href="qlayoutitem.html#heightForWidth">QLayoutItem</a>.</p>
 
159
<h3 class="fn"><a name="invalidate"></a>void QGridLayout::invalidate ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
160
<p>Resets cached information.</p>
 
161
<p>Reimplemented from <a href="qlayoutitem.html#invalidate">QLayoutItem</a>.</p>
 
162
<h3 class="fn"><a name="maximumSize"></a><a href="qsize.html">QSize</a> QGridLayout::maximumSize () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
163
<p>Returns the maximum size needed by this grid.</p>
 
164
<p>Reimplemented from <a href="qlayoutitem.html#maximumSize">QLayoutItem</a>.</p>
 
165
<h3 class="fn"><a name="minimumSize"></a><a href="qsize.html">QSize</a> QGridLayout::minimumSize () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
166
<p>Returns the minimum size needed by this grid.</p>
 
167
<p>Reimplemented from <a href="qlayoutitem.html#minimumSize">QLayoutItem</a>.</p>
 
168
<h3 class="fn"><a name="originCorner"></a><a href="qt.html#Corner-enum">Qt::Corner</a> QGridLayout::originCorner () const</h3>
 
169
<p>Returns the corner that's used for the grid's origin, i.e. for position (0, 0).</p>
 
170
<h3 class="fn"><a name="rowCount"></a>int QGridLayout::rowCount () const</h3>
 
171
<p>Returns the number of rows in this grid.</p>
 
172
<h3 class="fn"><a name="rowMinimumHeight"></a>int QGridLayout::rowMinimumHeight ( int <i>row</i> ) const</h3>
 
173
<p>Returns the minimum width set for row <i>row</i>.</p>
 
174
<p>See also <a href="qgridlayout.html#setRowMinimumHeight">setRowMinimumHeight</a>().</p>
 
175
<h3 class="fn"><a name="rowStretch"></a>int QGridLayout::rowStretch ( int <i>row</i> ) const</h3>
 
176
<p>Returns the stretch factor for row <i>row</i>.</p>
 
177
<p>See also <a href="qgridlayout.html#setRowStretch">setRowStretch</a>().</p>
 
178
<h3 class="fn"><a name="setColumnMinimumWidth"></a>void QGridLayout::setColumnMinimumWidth ( int <i>column</i>, int <i>minSize</i> )</h3>
 
179
<p>Sets the minimum width of column <i>column</i> to <i>minSize</i> pixels.</p>
 
180
<p>See also <a href="qgridlayout.html#columnMinimumWidth">columnMinimumWidth</a>() and <a href="qgridlayout.html#setRowMinimumHeight">setRowMinimumHeight</a>().</p>
 
181
<h3 class="fn"><a name="setColumnStretch"></a>void QGridLayout::setColumnStretch ( int <i>column</i>, int <i>stretch</i> )</h3>
 
182
<p>Sets the stretch factor of column <i>column</i> to <i>stretch</i>. The first column is number 0.</p>
 
183
<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>
 
184
<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>
 
185
<p>An alternative approach is to add spacing using <a href="qgridlayout.html#addItem">addItem</a>() with a <a href="qspaceritem.html">QSpacerItem</a>.</p>
 
186
<p>See also <a href="qgridlayout.html#columnStretch">columnStretch</a>() and <a href="qgridlayout.html#setRowStretch">setRowStretch</a>().</p>
 
187
<h3 class="fn"><a name="setGeometry"></a>void QGridLayout::setGeometry ( const <a href="qrect.html">QRect</a> &amp; <i>rect</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
188
<p>Resizes managed widgets within the rectangle <i>rect</i>.</p>
 
189
<p>Reimplemented from <a href="qlayoutitem.html#setGeometry">QLayoutItem</a>.</p>
 
190
<h3 class="fn"><a name="setOriginCorner"></a>void QGridLayout::setOriginCorner ( <a href="qt.html#Corner-enum">Qt::Corner</a> <i>corner</i> )</h3>
 
191
<p>Sets the grid's origin corner, i.e. position (0, 0), to <i>corner</i>.</p>
 
192
<h3 class="fn"><a name="setRowMinimumHeight"></a>void QGridLayout::setRowMinimumHeight ( int <i>row</i>, int <i>minSize</i> )</h3>
 
193
<p>Sets the minimum height of row <i>row</i> to <i>minSize</i> pixels.</p>
 
194
<p>See also <a href="qgridlayout.html#rowMinimumHeight">rowMinimumHeight</a>() and <a href="qgridlayout.html#setColumnMinimumWidth">setColumnMinimumWidth</a>().</p>
 
195
<h3 class="fn"><a name="setRowStretch"></a>void QGridLayout::setRowStretch ( int <i>row</i>, int <i>stretch</i> )</h3>
 
196
<p>Sets the stretch factor of row <i>row</i> to <i>stretch</i>. The first row is number 0.</p>
 
197
<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>
 
198
<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>
 
199
<p>See also <a href="qgridlayout.html#rowStretch">rowStretch</a>(), <a href="qgridlayout.html#setRowMinimumHeight">setRowMinimumHeight</a>(), and <a href="qgridlayout.html#setColumnStretch">setColumnStretch</a>().</p>
 
200
<h3 class="fn"><a name="sizeHint"></a><a href="qsize.html">QSize</a> QGridLayout::sizeHint () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
201
<p>Returns the preferred size of this grid.</p>
 
202
<p>Reimplemented from <a href="qlayoutitem.html#sizeHint">QLayoutItem</a>.</p>
 
203
<p /><address><hr /><div align="center">
 
204
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
205
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
206
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
207
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
208
</tr></table></div></address></body>
 
209
</html>