1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QGridLayout Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">  </td><td class="postheader" 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="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QGridLayout Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QGridLayout class lays out widgets in a grid. <a href="#details">More...</a></p>
<p>Inherits <a href="qlayout.html">QLayout</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qgridlayout.html#QGridLayout">__init__</a></b> (<i>self</i>, QWidget <i>parent</i>)</li><li><div class="fn" /><b><a href="qgridlayout.html#QGridLayout-2">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qgridlayout.html#addItem">addItem</a></b> (<i>self</i>, 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><li><div class="fn" /><b><a href="qgridlayout.html#addItem-2">addItem</a></b> (<i>self</i>, QLayoutItem)</li><li><div class="fn" /><b><a href="qgridlayout.html#addLayout">addLayout</a></b> (<i>self</i>, QLayout, int <i>row</i>, int <i>column</i>, Qt.Alignment <i>alignment</i> = 0)</li><li><div class="fn" /><b><a href="qgridlayout.html#addLayout-2">addLayout</a></b> (<i>self</i>, QLayout, int <i>row</i>, int <i>column</i>, int <i>rowSpan</i>, int <i>columnSpan</i>, Qt.Alignment <i>alignment</i> = 0)</li><li><div class="fn" /><b><a href="qgridlayout.html#addWidget">addWidget</a></b> (<i>self</i>, QWidget <i>w</i>)</li><li><div class="fn" /><b><a href="qgridlayout.html#addWidget-2">addWidget</a></b> (<i>self</i>, QWidget, int <i>row</i>, int <i>column</i>, Qt.Alignment <i>alignment</i> = 0)</li><li><div class="fn" /><b><a href="qgridlayout.html#addWidget-3">addWidget</a></b> (<i>self</i>, QWidget, int <i>row</i>, int <i>column</i>, int <i>rowSpan</i>, int <i>columnSpan</i>, Qt.Alignment <i>alignment</i> = 0)</li><li><div class="fn" />QRect <b><a href="qgridlayout.html#cellRect">cellRect</a></b> (<i>self</i>, int <i>row</i>, int <i>column</i>)</li><li><div class="fn" />int <b><a href="qgridlayout.html#columnCount">columnCount</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qgridlayout.html#columnMinimumWidth">columnMinimumWidth</a></b> (<i>self</i>, int <i>column</i>)</li><li><div class="fn" />int <b><a href="qgridlayout.html#columnStretch">columnStretch</a></b> (<i>self</i>, int <i>column</i>)</li><li><div class="fn" />int <b><a href="qgridlayout.html#count">count</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.Orientations <b><a href="qgridlayout.html#expandingDirections">expandingDirections</a></b> (<i>self</i>)</li><li><div class="fn" />(int <i>row</i>, int <i>column</i>, int <i>rowSpan</i>, int <i>columnSpan</i>) <b><a href="qgridlayout.html#getItemPosition">getItemPosition</a></b> (<i>self</i>, int <i>idx</i>)</li><li><div class="fn" />bool <b><a href="qgridlayout.html#hasHeightForWidth">hasHeightForWidth</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qgridlayout.html#heightForWidth">heightForWidth</a></b> (<i>self</i>, int)</li><li><div class="fn" />int <b><a href="qgridlayout.html#horizontalSpacing">horizontalSpacing</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qgridlayout.html#invalidate">invalidate</a></b> (<i>self</i>)</li><li><div class="fn" />QLayoutItem <b><a href="qgridlayout.html#itemAt">itemAt</a></b> (<i>self</i>, int)</li><li><div class="fn" />QLayoutItem <b><a href="qgridlayout.html#itemAtPosition">itemAtPosition</a></b> (<i>self</i>, int <i>row</i>, int <i>column</i>)</li><li><div class="fn" />QSize <b><a href="qgridlayout.html#maximumSize">maximumSize</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qgridlayout.html#minimumHeightForWidth">minimumHeightForWidth</a></b> (<i>self</i>, int)</li><li><div class="fn" />QSize <b><a href="qgridlayout.html#minimumSize">minimumSize</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.Corner <b><a href="qgridlayout.html#originCorner">originCorner</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qgridlayout.html#rowCount">rowCount</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qgridlayout.html#rowMinimumHeight">rowMinimumHeight</a></b> (<i>self</i>, int <i>row</i>)</li><li><div class="fn" />int <b><a href="qgridlayout.html#rowStretch">rowStretch</a></b> (<i>self</i>, int <i>row</i>)</li><li><div class="fn" /><b><a href="qgridlayout.html#setColumnMinimumWidth">setColumnMinimumWidth</a></b> (<i>self</i>, int <i>column</i>, int <i>minSize</i>)</li><li><div class="fn" /><b><a href="qgridlayout.html#setColumnStretch">setColumnStretch</a></b> (<i>self</i>, int <i>column</i>, int <i>stretch</i>)</li><li><div class="fn" /><b><a href="qgridlayout.html#setDefaultPositioning">setDefaultPositioning</a></b> (<i>self</i>, int <i>n</i>, Qt.Orientation <i>orient</i>)</li><li><div class="fn" /><b><a href="qgridlayout.html#setGeometry">setGeometry</a></b> (<i>self</i>, QRect)</li><li><div class="fn" /><b><a href="qgridlayout.html#setHorizontalSpacing">setHorizontalSpacing</a></b> (<i>self</i>, int <i>spacing</i>)</li><li><div class="fn" /><b><a href="qgridlayout.html#setOriginCorner">setOriginCorner</a></b> (<i>self</i>, Qt.Corner)</li><li><div class="fn" /><b><a href="qgridlayout.html#setRowMinimumHeight">setRowMinimumHeight</a></b> (<i>self</i>, int <i>row</i>, int <i>minSize</i>)</li><li><div class="fn" /><b><a href="qgridlayout.html#setRowStretch">setRowStretch</a></b> (<i>self</i>, int <i>row</i>, int <i>stretch</i>)</li><li><div class="fn" /><b><a href="qgridlayout.html#setSpacing">setSpacing</a></b> (<i>self</i>, int <i>spacing</i>)</li><li><div class="fn" /><b><a href="qgridlayout.html#setVerticalSpacing">setVerticalSpacing</a></b> (<i>self</i>, int <i>spacing</i>)</li><li><div class="fn" />QSize <b><a href="qgridlayout.html#sizeHint">sizeHint</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qgridlayout.html#spacing">spacing</a></b> (<i>self</i>)</li><li><div class="fn" />QLayoutItem <b><a href="qgridlayout.html#takeAt">takeAt</a></b> (<i>self</i>, int)</li><li><div class="fn" />int <b><a href="qgridlayout.html#verticalSpacing">verticalSpacing</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><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#parentWidget">parentWidget</a>()), divides it up into
rows and columns, and puts each widget it manages into the correct
cell.</p>
<p>Columns and rows behave identically; we will discuss columns,
but there are equivalent functions for rows.</p>
<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>
<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>
<p>To remove a widget from a layout, call <a href="qlayout.html#removeWidget">removeWidget</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>
<p>This illustration shows a fragment of a dialog with a
five-column, three-row grid (the grid is shown overlaid in
magenta):</p>
<p class="centerAlign"><img alt="A grid layout" src="images/gridlayout.png" /></p>
<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>
<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>
<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>
<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>
<p>QGridLayout also includes two margin widths: the <a href="qlayout.html#getContentsMargins">contents margin</a> and the
<a href="qgridlayout.html#spacing">spacing</a>(). The contents
margin is the width of the reserved space along each of the
QGridLayout's four sides. The <a href="qgridlayout.html#spacing">spacing</a>() is the width of the
automatically allocated spacing between neighboring boxes.</p>
<p>The default contents margin values are provided by the <a href="qstyle.html#pixelMetric">style</a>. The default value Qt styles
specify is 9 for child widgets and 11 for windows. The spacing
defaults to the same as the margin width for a top-level layout, or
to the same as the parent layout.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QGridLayout" />QGridLayout.__init__ (<i>self</i>, <a href="qwidget.html">QWidget</a> <i>parent</i>)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><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>
<h3 class="fn"><a name="QGridLayout-2" />QGridLayout.__init__ (<i>self</i>)</h3><p>Constructs a new grid layout.</p>
<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>
<h3 class="fn"><a name="addItem" />QGridLayout.addItem (<i>self</i>, <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-alignment.html">Qt.Alignment</a> <i>alignment</i> = 0)</h3><p>The <i>item</i> argument has it's ownership transferred to Qt.</p><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>
<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>
<h3 class="fn"><a name="addItem-2" />QGridLayout.addItem (<i>self</i>, <a href="qlayoutitem.html">QLayoutItem</a>)</h3><p>The <i>QLayoutItem</i> argument has it's ownership transferred to Qt.</p><p>Reimplemented from <a href="qlayout.html#addItem">QLayout.addItem</a>().</p>
<h3 class="fn"><a name="addLayout" />QGridLayout.addLayout (<i>self</i>, <a href="qlayout.html">QLayout</a>, int <i>row</i>, int <i>column</i>, <a href="qt-alignment.html">Qt.Alignment</a> <i>alignment</i> = 0)</h3><p>The <i>QLayout</i> argument has it's ownership transferred to Qt.</p><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>
<p>The alignment is specified by <i>alignment</i>. The default
alignment is 0, which means that the widget fills the entire
cell.</p>
<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>
<p><i>layout</i> becomes a child of the grid layout.</p>
<h3 class="fn"><a name="addLayout-2" />QGridLayout.addLayout (<i>self</i>, <a href="qlayout.html">QLayout</a>, int <i>row</i>, int <i>column</i>, int <i>rowSpan</i>, int <i>columnSpan</i>, <a href="qt-alignment.html">Qt.Alignment</a> <i>alignment</i> = 0)</h3><p>The <i>QLayout</i> argument has it's ownership transferred to Qt.</p><p>This is an overloaded function.</p>
<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>
<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>
<h3 class="fn"><a name="addWidget" />QGridLayout.addWidget (<i>self</i>, <a href="qwidget.html">QWidget</a> <i>w</i>)</h3><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>
<p>The alignment is specified by <i>alignment</i>. The default
alignment is 0, which means that the widget fills the entire
cell.</p>
<h3 class="fn"><a name="addWidget-2" />QGridLayout.addWidget (<i>self</i>, <a href="qwidget.html">QWidget</a>, int <i>row</i>, int <i>column</i>, <a href="qt-alignment.html">Qt.Alignment</a> <i>alignment</i> = 0)</h3><p>This is an overloaded function.</p>
<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 <i>widget</i> will have the given
<i>alignment</i>.</p>
<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>
<h3 class="fn"><a name="addWidget-3" />QGridLayout.addWidget (<i>self</i>, <a href="qwidget.html">QWidget</a>, int <i>row</i>, int <i>column</i>, int <i>rowSpan</i>, int <i>columnSpan</i>, <a href="qt-alignment.html">Qt.Alignment</a> <i>alignment</i> = 0)</h3><h3 class="fn"><a name="cellRect" /><a href="qrect.html">QRect</a> QGridLayout.cellRect (<i>self</i>, int <i>row</i>, int <i>column</i>)</h3><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>
<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>
<h3 class="fn"><a name="columnCount" />int QGridLayout.columnCount (<i>self</i>)</h3><p>Returns the number of columns in this grid.</p>
<h3 class="fn"><a name="columnMinimumWidth" />int QGridLayout.columnMinimumWidth (<i>self</i>, int <i>column</i>)</h3><p>Returns the column spacing for column <i>column</i>.</p>
<p><b>See also</b> <a href="qgridlayout.html#setColumnMinimumWidth">setColumnMinimumWidth</a>().</p>
<h3 class="fn"><a name="columnStretch" />int QGridLayout.columnStretch (<i>self</i>, int <i>column</i>)</h3><p>Returns the stretch factor for column <i>column</i>.</p>
<p><b>See also</b> <a href="qgridlayout.html#setColumnStretch">setColumnStretch</a>().</p>
<h3 class="fn"><a name="count" />int QGridLayout.count (<i>self</i>)</h3><p>Reimplemented from <a href="qlayout.html#count">QLayout.count</a>().</p>
<h3 class="fn"><a name="expandingDirections" /><a href="qt-orientations.html">Qt.Orientations</a> QGridLayout.expandingDirections (<i>self</i>)</h3><p>Reimplemented from <a href="qlayoutitem.html#expandingDirections">QLayoutItem.expandingDirections</a>().</p>
<h3 class="fn"><a name="getItemPosition" />(int <i>row</i>, int <i>column</i>, int <i>rowSpan</i>, int <i>columnSpan</i>) QGridLayout.getItemPosition (<i>self</i>, int <i>idx</i>)</h3><p>Returns the position information of the item with the given
<i>index</i>.</p>
<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>
<p><b>See also</b> <a href="qgridlayout.html#itemAtPosition">itemAtPosition</a>() and <a href="qgridlayout.html#itemAt">itemAt</a>().</p>
<h3 class="fn"><a name="hasHeightForWidth" />bool QGridLayout.hasHeightForWidth (<i>self</i>)</h3><p>Reimplemented from <a href="qlayoutitem.html#hasHeightForWidth">QLayoutItem.hasHeightForWidth</a>().</p>
<h3 class="fn"><a name="heightForWidth" />int QGridLayout.heightForWidth (<i>self</i>, int)</h3><p>Reimplemented from <a href="qlayoutitem.html#heightForWidth">QLayoutItem.heightForWidth</a>().</p>
<h3 class="fn"><a name="horizontalSpacing" />int QGridLayout.horizontalSpacing (<i>self</i>)</h3><h3 class="fn"><a name="invalidate" />QGridLayout.invalidate (<i>self</i>)</h3><p>Reimplemented from <a href="qlayoutitem.html#invalidate">QLayoutItem.invalidate</a>().</p>
<h3 class="fn"><a name="itemAt" /><a href="qlayoutitem.html">QLayoutItem</a> QGridLayout.itemAt (<i>self</i>, int)</h3><p>Reimplemented from <a href="qlayout.html#itemAt">QLayout.itemAt</a>().</p>
<h3 class="fn"><a name="itemAtPosition" /><a href="qlayoutitem.html">QLayoutItem</a> QGridLayout.itemAtPosition (<i>self</i>, int <i>row</i>, int <i>column</i>)</h3><p>Returns the layout item that occupies cell (<i>row</i>,
<i>column</i>), or 0 if the cell is empty.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also</b> <a href="qgridlayout.html#getItemPosition">getItemPosition</a>() and
<a href="qlayout.html#indexOf">indexOf</a>().</p>
<h3 class="fn"><a name="maximumSize" /><a href="qsize.html">QSize</a> QGridLayout.maximumSize (<i>self</i>)</h3><p>Reimplemented from <a href="qlayoutitem.html#maximumSize">QLayoutItem.maximumSize</a>().</p>
<h3 class="fn"><a name="minimumHeightForWidth" />int QGridLayout.minimumHeightForWidth (<i>self</i>, int)</h3><p>Reimplemented from <a href="qlayoutitem.html#minimumHeightForWidth">QLayoutItem.minimumHeightForWidth</a>().</p>
<h3 class="fn"><a name="minimumSize" /><a href="qsize.html">QSize</a> QGridLayout.minimumSize (<i>self</i>)</h3><p>Reimplemented from <a href="qlayoutitem.html#minimumSize">QLayoutItem.minimumSize</a>().</p>
<h3 class="fn"><a name="originCorner" /><a href="qt.html#Corner-enum">Qt.Corner</a> QGridLayout.originCorner (<i>self</i>)</h3><p>Returns the corner that's used for the grid's origin, i.e. for
position (0, 0).</p>
<p><b>See also</b> <a href="qgridlayout.html#setOriginCorner">setOriginCorner</a>().</p>
<h3 class="fn"><a name="rowCount" />int QGridLayout.rowCount (<i>self</i>)</h3><p>Returns the number of rows in this grid.</p>
<h3 class="fn"><a name="rowMinimumHeight" />int QGridLayout.rowMinimumHeight (<i>self</i>, int <i>row</i>)</h3><p>Returns the minimum width set for row <i>row</i>.</p>
<p><b>See also</b> <a href="qgridlayout.html#setRowMinimumHeight">setRowMinimumHeight</a>().</p>
<h3 class="fn"><a name="rowStretch" />int QGridLayout.rowStretch (<i>self</i>, int <i>row</i>)</h3><p>Returns the stretch factor for row <i>row</i>.</p>
<p><b>See also</b> <a href="qgridlayout.html#setRowStretch">setRowStretch</a>().</p>
<h3 class="fn"><a name="setColumnMinimumWidth" />QGridLayout.setColumnMinimumWidth (<i>self</i>, int <i>column</i>, int <i>minSize</i>)</h3><p>Sets the minimum width of column <i>column</i> to <i>minSize</i>
pixels.</p>
<p><b>See also</b> <a href="qgridlayout.html#columnMinimumWidth">columnMinimumWidth</a>() and
<a href="qgridlayout.html#setRowMinimumHeight">setRowMinimumHeight</a>().</p>
<h3 class="fn"><a name="setColumnStretch" />QGridLayout.setColumnStretch (<i>self</i>, int <i>column</i>, int <i>stretch</i>)</h3><p>Sets the stretch factor of column <i>column</i> to
<i>stretch</i>. The first column is number 0.</p>
<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>
<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>An alternative approach is to add spacing using <a href="qgridlayout.html#addItem">addItem</a>() with a <a href="qspaceritem.html">QSpacerItem</a>.</p>
<p><b>See also</b> <a href="qgridlayout.html#columnStretch">columnStretch</a>() and <a href="qgridlayout.html#setRowStretch">setRowStretch</a>().</p>
<h3 class="fn"><a name="setDefaultPositioning" />QGridLayout.setDefaultPositioning (<i>self</i>, int <i>n</i>, <a href="qt.html#Orientation-enum">Qt.Orientation</a> <i>orient</i>)</h3><h3 class="fn"><a name="setGeometry" />QGridLayout.setGeometry (<i>self</i>, <a href="qrect.html">QRect</a>)</h3><p>Reimplemented from <a href="qlayoutitem.html#setGeometry">QLayoutItem.setGeometry</a>().</p>
<h3 class="fn"><a name="setHorizontalSpacing" />QGridLayout.setHorizontalSpacing (<i>self</i>, int <i>spacing</i>)</h3><h3 class="fn"><a name="setOriginCorner" />QGridLayout.setOriginCorner (<i>self</i>, <a href="qt.html#Corner-enum">Qt.Corner</a>)</h3><p>Sets the grid's origin corner, i.e. position (0, 0), to
<i>corner</i>.</p>
<p><b>See also</b> <a href="qgridlayout.html#originCorner">originCorner</a>().</p>
<h3 class="fn"><a name="setRowMinimumHeight" />QGridLayout.setRowMinimumHeight (<i>self</i>, int <i>row</i>, int <i>minSize</i>)</h3><p>Sets the minimum height of row <i>row</i> to <i>minSize</i>
pixels.</p>
<p><b>See also</b> <a href="qgridlayout.html#rowMinimumHeight">rowMinimumHeight</a>() and
<a href="qgridlayout.html#setColumnMinimumWidth">setColumnMinimumWidth</a>().</p>
<h3 class="fn"><a name="setRowStretch" />QGridLayout.setRowStretch (<i>self</i>, int <i>row</i>, int <i>stretch</i>)</h3><p>Sets the stretch factor of row <i>row</i> to <i>stretch</i>. The
first row is number 0.</p>
<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>
<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><b>See also</b> <a href="qgridlayout.html#rowStretch">rowStretch</a>(), <a href="qgridlayout.html#setRowMinimumHeight">setRowMinimumHeight</a>(),
and <a href="qgridlayout.html#setColumnStretch">setColumnStretch</a>().</p>
<h3 class="fn"><a name="setSpacing" />QGridLayout.setSpacing (<i>self</i>, int <i>spacing</i>)</h3><p>This function sets both the vertical and horizontal spacing to
<i>spacing</i>.</p>
<p><b>See also</b> <a href="qgridlayout.html#spacing">spacing</a>(), <a href="qgridlayout.html#verticalSpacing-prop">setVerticalSpacing</a>(),
and <a href="qgridlayout.html#horizontalSpacing-prop">setHorizontalSpacing</a>().</p>
<h3 class="fn"><a name="setVerticalSpacing" />QGridLayout.setVerticalSpacing (<i>self</i>, int <i>spacing</i>)</h3><h3 class="fn"><a name="sizeHint" /><a href="qsize.html">QSize</a> QGridLayout.sizeHint (<i>self</i>)</h3><p>Reimplemented from <a href="qlayoutitem.html#sizeHint">QLayoutItem.sizeHint</a>().</p>
<h3 class="fn"><a name="spacing" />int QGridLayout.spacing (<i>self</i>)</h3><p>If the vertical spacing is equal to the horizontal spacing, this
function returns that value; otherwise it return -1.</p>
<p><b>See also</b> <a href="qgridlayout.html#setSpacing">setSpacing</a>(), <a href="qgridlayout.html#verticalSpacing-prop">verticalSpacing</a>(), and
<a href="qgridlayout.html#horizontalSpacing-prop">horizontalSpacing</a>().</p>
<h3 class="fn"><a name="takeAt" /><a href="qlayoutitem.html">QLayoutItem</a> QGridLayout.takeAt (<i>self</i>, int)</h3><p>The <i>QLayoutItem</i> result</p><p>Reimplemented from <a href="qlayout.html#takeAt">QLayout.takeAt</a>().</p>
<h3 class="fn"><a name="verticalSpacing" />int QGridLayout.verticalSpacing (<i>self</i>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.12.1 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qt.io">The Qt Company</a> 2015</td><td align="right" width="25%">Qt 4.8.7</td></tr></table></div></address></body></html>
|