Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 691

python-qt4-doc-4.10.3-3.mga4.noarch.rpm

<?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>QFormLayout 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">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QFormLayout Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QFormLayout class manages forms of input widgets and their
associated labels. <a href="#details">More...</a></p>

<p>Inherits <a href="qlayout.html">QLayout</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qformlayout.html#FieldGrowthPolicy-enum">FieldGrowthPolicy</a></b> { FieldsStayAtSizeHint, ExpandingFieldsGrow, AllNonFixedFieldsGrow }</li><li><div class="fn" />enum <b><a href="qformlayout.html#ItemRole-enum">ItemRole</a></b> { LabelRole, FieldRole, SpanningRole }</li><li><div class="fn" />enum <b><a href="qformlayout.html#RowWrapPolicy-enum">RowWrapPolicy</a></b> { DontWrapRows, WrapLongRows, WrapAllRows }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qformlayout.html#QFormLayout">__init__</a></b> (<i>self</i>, QWidget&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qformlayout.html#addItem">addItem</a></b> (<i>self</i>, QLayoutItem&#160;<i>item</i>)</li><li><div class="fn" /><b><a href="qformlayout.html#addRow">addRow</a></b> (<i>self</i>, QWidget&#160;<i>label</i>, QWidget&#160;<i>field</i>)</li><li><div class="fn" /><b><a href="qformlayout.html#addRow-2">addRow</a></b> (<i>self</i>, QWidget&#160;<i>label</i>, QLayout&#160;<i>field</i>)</li><li><div class="fn" /><b><a href="qformlayout.html#addRow-3">addRow</a></b> (<i>self</i>, QString&#160;<i>labelText</i>, QWidget&#160;<i>field</i>)</li><li><div class="fn" /><b><a href="qformlayout.html#addRow-4">addRow</a></b> (<i>self</i>, QString&#160;<i>labelText</i>, QLayout&#160;<i>field</i>)</li><li><div class="fn" /><b><a href="qformlayout.html#addRow-5">addRow</a></b> (<i>self</i>, QWidget&#160;<i>widget</i>)</li><li><div class="fn" /><b><a href="qformlayout.html#addRow-6">addRow</a></b> (<i>self</i>, QLayout&#160;<i>layout</i>)</li><li><div class="fn" />int <b><a href="qformlayout.html#count">count</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.Orientations <b><a href="qformlayout.html#expandingDirections">expandingDirections</a></b> (<i>self</i>)</li><li><div class="fn" />FieldGrowthPolicy <b><a href="qformlayout.html#fieldGrowthPolicy">fieldGrowthPolicy</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.Alignment <b><a href="qformlayout.html#formAlignment">formAlignment</a></b> (<i>self</i>)</li><li><div class="fn" />(int&#160;<i>rowPtr</i>, ItemRole&#160;<i>rolePtr</i>) <b><a href="qformlayout.html#getItemPosition">getItemPosition</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />(int&#160;<i>rowPtr</i>, ItemRole&#160;<i>rolePtr</i>) <b><a href="qformlayout.html#getLayoutPosition">getLayoutPosition</a></b> (<i>self</i>, QLayout&#160;<i>layout</i>)</li><li><div class="fn" />(int&#160;<i>rowPtr</i>, ItemRole&#160;<i>rolePtr</i>) <b><a href="qformlayout.html#getWidgetPosition">getWidgetPosition</a></b> (<i>self</i>, QWidget&#160;<i>widget</i>)</li><li><div class="fn" />bool <b><a href="qformlayout.html#hasHeightForWidth">hasHeightForWidth</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qformlayout.html#heightForWidth">heightForWidth</a></b> (<i>self</i>, int&#160;<i>width</i>)</li><li><div class="fn" />int <b><a href="qformlayout.html#horizontalSpacing">horizontalSpacing</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qformlayout.html#insertRow">insertRow</a></b> (<i>self</i>, int&#160;<i>row</i>, QWidget&#160;<i>label</i>, QWidget&#160;<i>field</i>)</li><li><div class="fn" /><b><a href="qformlayout.html#insertRow-2">insertRow</a></b> (<i>self</i>, int&#160;<i>row</i>, QWidget&#160;<i>label</i>, QLayout&#160;<i>field</i>)</li><li><div class="fn" /><b><a href="qformlayout.html#insertRow-3">insertRow</a></b> (<i>self</i>, int&#160;<i>row</i>, QString&#160;<i>labelText</i>, QWidget&#160;<i>field</i>)</li><li><div class="fn" /><b><a href="qformlayout.html#insertRow-4">insertRow</a></b> (<i>self</i>, int&#160;<i>row</i>, QString&#160;<i>labelText</i>, QLayout&#160;<i>field</i>)</li><li><div class="fn" /><b><a href="qformlayout.html#insertRow-5">insertRow</a></b> (<i>self</i>, int&#160;<i>row</i>, QWidget&#160;<i>widget</i>)</li><li><div class="fn" /><b><a href="qformlayout.html#insertRow-6">insertRow</a></b> (<i>self</i>, int&#160;<i>row</i>, QLayout&#160;<i>layout</i>)</li><li><div class="fn" /><b><a href="qformlayout.html#invalidate">invalidate</a></b> (<i>self</i>)</li><li><div class="fn" />QLayoutItem <b><a href="qformlayout.html#itemAt">itemAt</a></b> (<i>self</i>, int&#160;<i>row</i>, ItemRole&#160;<i>role</i>)</li><li><div class="fn" />QLayoutItem <b><a href="qformlayout.html#itemAt-2">itemAt</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />Qt.Alignment <b><a href="qformlayout.html#labelAlignment">labelAlignment</a></b> (<i>self</i>)</li><li><div class="fn" />QWidget <b><a href="qformlayout.html#labelForField">labelForField</a></b> (<i>self</i>, QWidget&#160;<i>field</i>)</li><li><div class="fn" />QWidget <b><a href="qformlayout.html#labelForField-2">labelForField</a></b> (<i>self</i>, QLayout&#160;<i>field</i>)</li><li><div class="fn" />QSize <b><a href="qformlayout.html#minimumSize">minimumSize</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qformlayout.html#rowCount">rowCount</a></b> (<i>self</i>)</li><li><div class="fn" />RowWrapPolicy <b><a href="qformlayout.html#rowWrapPolicy">rowWrapPolicy</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qformlayout.html#setFieldGrowthPolicy">setFieldGrowthPolicy</a></b> (<i>self</i>, FieldGrowthPolicy&#160;<i>policy</i>)</li><li><div class="fn" /><b><a href="qformlayout.html#setFormAlignment">setFormAlignment</a></b> (<i>self</i>, Qt.Alignment&#160;<i>alignment</i>)</li><li><div class="fn" /><b><a href="qformlayout.html#setGeometry">setGeometry</a></b> (<i>self</i>, QRect&#160;<i>rect</i>)</li><li><div class="fn" /><b><a href="qformlayout.html#setHorizontalSpacing">setHorizontalSpacing</a></b> (<i>self</i>, int&#160;<i>spacing</i>)</li><li><div class="fn" /><b><a href="qformlayout.html#setItem">setItem</a></b> (<i>self</i>, int&#160;<i>row</i>, ItemRole&#160;<i>role</i>, QLayoutItem&#160;<i>item</i>)</li><li><div class="fn" /><b><a href="qformlayout.html#setLabelAlignment">setLabelAlignment</a></b> (<i>self</i>, Qt.Alignment&#160;<i>alignment</i>)</li><li><div class="fn" /><b><a href="qformlayout.html#setLayout">setLayout</a></b> (<i>self</i>, int&#160;<i>row</i>, ItemRole&#160;<i>role</i>, QLayout&#160;<i>layout</i>)</li><li><div class="fn" /><b><a href="qformlayout.html#setRowWrapPolicy">setRowWrapPolicy</a></b> (<i>self</i>, RowWrapPolicy&#160;<i>policy</i>)</li><li><div class="fn" /><b><a href="qformlayout.html#setSpacing">setSpacing</a></b> (<i>self</i>, int)</li><li><div class="fn" /><b><a href="qformlayout.html#setVerticalSpacing">setVerticalSpacing</a></b> (<i>self</i>, int&#160;<i>spacing</i>)</li><li><div class="fn" /><b><a href="qformlayout.html#setWidget">setWidget</a></b> (<i>self</i>, int&#160;<i>row</i>, ItemRole&#160;<i>role</i>, QWidget&#160;<i>widget</i>)</li><li><div class="fn" />QSize <b><a href="qformlayout.html#sizeHint">sizeHint</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qformlayout.html#spacing">spacing</a></b> (<i>self</i>)</li><li><div class="fn" />QLayoutItem <b><a href="qformlayout.html#takeAt">takeAt</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />int <b><a href="qformlayout.html#verticalSpacing">verticalSpacing</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QFormLayout class manages forms of input widgets and their
associated labels.</p>
<p>QFormLayout is a convenience layout class that lays out its
children in a two-column form. The left column consists of labels
and the right column consists of "field" widgets (line editors,
spin boxes, etc.).</p>
<p>Traditionally, such two-column form layouts were achieved using
<a href="qgridlayout.html">QGridLayout</a>. QFormLayout is a
higher-level alternative that provides the following
advantages:</p>
<ul>
<li><b>Adherence to the different platform's look and feel
guidelines.</b>
<p>For example, the <a href="http://developer.apple.com/documentation/UserExperience/Conceptual/AppleHIGuidelines/XHIGIntro/chapter_1_section_1.html">
Mac OS X Aqua</a> and KDE guidelines specify that the labels should
be right-aligned, whereas Windows and GNOME applications normally
use left-alignment.</p>
</li>
<li><b>Support for wrapping long rows.</b>
<p>For devices with small displays, QFormLayout can be set to
<a href="qformlayout.html#RowWrapPolicy-enum">wrap long rows</a>,
or even to <a href="qformlayout.html#RowWrapPolicy-enum">wrap all
rows</a>.</p>
</li>
<li><b>Convenient API for creating label--field pairs.</b>
<p>The <a href="qformlayout.html#addRow">addRow</a>() overload that
takes a <a href="qstring.html">QString</a> and a <a href="qwidget.html">QWidget</a> * creates a <a href="qlabel.html">QLabel</a> behind the scenes and automatically set up
its buddy. We can then write code like this:</p>
<pre class="cpp">
 <span class="type">QFormLayout</span> <span class="operator">*</span>formLayout <span class="operator">=</span> <span class="keyword">new</span> <span class="type">QFormLayout</span>;
 formLayout<span class="operator">-</span><span class="operator">&gt;</span><a href="qformlayout.html#addRow">addRow</a>(tr(<span class="string">"&amp;Name:"</span>)<span class="operator">,</span> nameLineEdit);
 formLayout<span class="operator">-</span><span class="operator">&gt;</span><a href="qformlayout.html#addRow">addRow</a>(tr(<span class="string">"&amp;Email:"</span>)<span class="operator">,</span> emailLineEdit);
 formLayout<span class="operator">-</span><span class="operator">&gt;</span><a href="qformlayout.html#addRow">addRow</a>(tr(<span class="string">"&amp;Age:"</span>)<span class="operator">,</span> ageSpinBox);
 <a href="qformlayout.html#setLayout">setLayout</a>(formLayout);
</pre>
<p>Compare this with the following code, written using <a href="qgridlayout.html">QGridLayout</a>:</p>
<pre class="cpp">
 nameLabel <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qlabel.html">QLabel</a></span>(tr(<span class="string">"&amp;Name:"</span>));
 nameLabel<span class="operator">-</span><span class="operator">&gt;</span>setBuddy(nameLineEdit);

 emailLabel <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qlabel.html">QLabel</a></span>(tr(<span class="string">"&amp;Name:"</span>));
 emailLabel<span class="operator">-</span><span class="operator">&gt;</span>setBuddy(emailLineEdit);

 ageLabel <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qlabel.html">QLabel</a></span>(tr(<span class="string">"&amp;Name:"</span>));
 ageLabel<span class="operator">-</span><span class="operator">&gt;</span>setBuddy(ageSpinBox);

 <span class="type"><a href="qgridlayout.html">QGridLayout</a></span> <span class="operator">*</span>gridLayout <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qgridlayout.html">QGridLayout</a></span>;
 gridLayout<span class="operator">-</span><span class="operator">&gt;</span><a href="qlayout.html#addWidget">addWidget</a>(nameLabel<span class="operator">,</span> <span class="number">0</span><span class="operator">,</span> <span class="number">0</span>);
 gridLayout<span class="operator">-</span><span class="operator">&gt;</span><a href="qlayout.html#addWidget">addWidget</a>(nameLineEdit<span class="operator">,</span> <span class="number">0</span><span class="operator">,</span> <span class="number">1</span>);
 gridLayout<span class="operator">-</span><span class="operator">&gt;</span><a href="qlayout.html#addWidget">addWidget</a>(emailLabel<span class="operator">,</span> <span class="number">1</span><span class="operator">,</span> <span class="number">0</span>);
 gridLayout<span class="operator">-</span><span class="operator">&gt;</span><a href="qlayout.html#addWidget">addWidget</a>(emailLineEdit<span class="operator">,</span> <span class="number">1</span><span class="operator">,</span> <span class="number">1</span>);
 gridLayout<span class="operator">-</span><span class="operator">&gt;</span><a href="qlayout.html#addWidget">addWidget</a>(ageLabel<span class="operator">,</span> <span class="number">2</span><span class="operator">,</span> <span class="number">0</span>);
 gridLayout<span class="operator">-</span><span class="operator">&gt;</span><a href="qlayout.html#addWidget">addWidget</a>(ageSpinBox<span class="operator">,</span> <span class="number">2</span><span class="operator">,</span> <span class="number">1</span>);
 <a href="qformlayout.html#setLayout">setLayout</a>(gridLayout);
</pre></li>
</ul>
<p>The table below shows the default appearance in different
styles.</p>
<table class="generic">
<thead>
<tr class="qt-style">
<th><a href="qcommonstyle.html">QCommonStyle</a> derived styles
(except <a href="qplastiquestyle.html">QPlastiqueStyle</a>)</th>
<th><a href="qmacstyle.html">QMacStyle</a></th>
<th><a href="qplastiquestyle.html">QPlastiqueStyle</a></th>
<th>Qt Extended styles</th>
</tr>
</thead>
<tr class="odd" valign="top">
<td><img alt="" src="images/qformlayout-win.png" /></td>
<td><img alt="" src="images/qformlayout-mac.png" /></td>
<td><img alt="" src="images/qformlayout-kde.png" /></td>
<td><img alt="" src="images/qformlayout-qpe.png" /></td>
</tr>
<tr class="even" valign="top">
<td>Traditional style used for Windows, GNOME, and earlier versions
of KDE. Labels are left aligned, and expanding fields grow to fill
the available space. (This normally corresponds to what we would
get using a two-column <a href="qgridlayout.html">QGridLayout</a>.)</td>
<td>Style based on the <a href="http://developer.apple.com/documentation/UserExperience/Conceptual/AppleHIGuidelines/XHIGIntro/chapter_1_section_1.html">
Mac OS X Aqua</a> guidelines. Labels are right-aligned, the fields
don't grow beyond their size hint, and the form is horizontally
centered.</td>
<td>Recommended style for <a href="http://www.kdedevelopers.org/node/2345">KDE applications</a>.
Similar to MacStyle, except that the form is left-aligned and all
fields grow to fill the available space.</td>
<td>Default style for Qt Extended styles. Labels are right-aligned,
expanding fields grow to fill the available space, and row wrapping
is enabled for long lines.</td>
</tr>
</table>
<p>The form styles can be also be overridden individually by
calling <a href="qformlayout.html#labelAlignment-prop">setLabelAlignment</a>(),
<a href="qformlayout.html#formAlignment-prop">setFormAlignment</a>(),
<a href="qformlayout.html#fieldGrowthPolicy-prop">setFieldGrowthPolicy</a>(),
and <a href="qformlayout.html#rowWrapPolicy-prop">setRowWrapPolicy</a>(). For
example, to simulate the form layout appearance of <a href="qmacstyle.html">QMacStyle</a> on all platforms, but with
left-aligned labels, you could write:</p>
<pre class="cpp">
 formLayout<span class="operator">-</span><span class="operator">&gt;</span><a href="qformlayout.html#rowWrapPolicy-prop">setRowWrapPolicy</a>(<span class="type">QFormLayout</span><span class="operator">.</span>DontWrapRows);
 formLayout<span class="operator">-</span><span class="operator">&gt;</span><a href="qformlayout.html#fieldGrowthPolicy-prop">setFieldGrowthPolicy</a>(<span class="type">QFormLayout</span><span class="operator">.</span>FieldsStayAtSizeHint);
 formLayout<span class="operator">-</span><span class="operator">&gt;</span><a href="qformlayout.html#formAlignment-prop">setFormAlignment</a>(<span class="type"><a href="qt.html">Qt</a></span><span class="operator">.</span>AlignHCenter <span class="operator">|</span> <span class="type"><a href="qt.html">Qt</a></span><span class="operator">.</span>AlignTop);
 formLayout<span class="operator">-</span><span class="operator">&gt;</span><a href="qformlayout.html#labelAlignment-prop">setLabelAlignment</a>(<span class="type"><a href="qt.html">Qt</a></span><span class="operator">.</span>AlignLeft);
</pre><hr /><h2>Type Documentation</h2><h3 class="fn"><a name="FieldGrowthPolicy-enum" />QFormLayout.FieldGrowthPolicy</h3><p>This enum specifies the different policies that can be used to
control the way in which the form's fields grow.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign">
<tt>QFormLayout.FieldsStayAtSizeHint</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">The fields never grow beyond their <a href="qwidgetitem.html#sizeHint">effective size hint</a>. This is the
default for <a href="qmacstyle.html">QMacStyle</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QFormLayout.ExpandingFieldsGrow</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">Fields with an horizontal <a href="qsizepolicy.html">size policy</a> of <a href="qsizepolicy.html#Policy-enum">Expanding</a> or <a href="qsizepolicy.html#Policy-enum">MinimumExpanding</a> will grow to
fill the available space. The other fields will not grow beyond
their effective size hint. This is the default policy for
Plastique.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QFormLayout.AllNonFixedFieldsGrow</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">All fields with a size policy that allows them
to grow will grow to fill the available space. This is the default
policy for most styles.</td>
</tr>
</table>
<p><b>See also</b> <a href="qformlayout.html#fieldGrowthPolicy-prop">fieldGrowthPolicy</a>.</p>


<h3 class="fn"><a name="ItemRole-enum" />QFormLayout.ItemRole</h3><p>This enum specifies the types of widgets (or other layout items)
that may appear in a row.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QFormLayout.LabelRole</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">A label widget.</td>
</tr>
<tr>
<td class="topAlign"><tt>QFormLayout.FieldRole</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">A field widget.</td>
</tr>
<tr>
<td class="topAlign"><tt>QFormLayout.SpanningRole</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">A widget that spans label and field
columns.</td>
</tr>
</table>
<p><b>See also</b> <a href="qformlayout.html#itemAt">itemAt</a>()
and <a href="qformlayout.html#getItemPosition">getItemPosition</a>().</p>


<h3 class="fn"><a name="RowWrapPolicy-enum" />QFormLayout.RowWrapPolicy</h3><p>This enum specifies the different policies that can be used to
control the way in which the form's rows wrap.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QFormLayout.DontWrapRows</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">Fields are always laid out next to their
label. This is the default policy for all styles except Qt Extended
styles and <a href="qs60style.html">QS60Style</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QFormLayout.WrapLongRows</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">Labels are given enough horizontal space to
fit the widest label, and the rest of the space is given to the
fields. If the minimum size of a field pair is wider than the
available space, the field is wrapped to the next line. This is the
default policy for Qt Extended styles and and <a href="qs60style.html">QS60Style</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QFormLayout.WrapAllRows</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">Fields are always laid out below their
label.</td>
</tr>
</table>
<p><b>See also</b> <a href="qformlayout.html#rowWrapPolicy-prop">rowWrapPolicy</a>.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QFormLayout" />QFormLayout.__init__ (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>parent</i>&#160;=&#160;None)</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 form layout with the given <i>parent</i>
widget.</p>
<p><b>See also</b> <a href="qwidget.html#setLayout">QWidget.setLayout</a>().</p>


<h3 class="fn"><a name="addItem" />QFormLayout.addItem (<i>self</i>, <a href="qlayoutitem.html">QLayoutItem</a>&#160;<i>item</i>)</h3><p>The <i>item</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="addRow" />QFormLayout.addRow (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>label</i>, <a href="qwidget.html">QWidget</a>&#160;<i>field</i>)</h3><p>The <i>label</i> argument has it's ownership transferred to Qt.</p><p>The <i>field</i> argument has it's ownership transferred to Qt.</p><p>Adds a new row to the bottom of this form layout, with the given
<i>label</i> and <i>field</i>.</p>
<p><b>See also</b> <a href="qformlayout.html#insertRow">insertRow</a>().</p>


<h3 class="fn"><a name="addRow-2" />QFormLayout.addRow (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>label</i>, <a href="qlayout.html">QLayout</a>&#160;<i>field</i>)</h3><p>The <i>label</i> argument has it's ownership transferred to Qt.</p><p>The <i>field</i> argument has it's ownership transferred to Qt.</p><p>This is an overloaded function.</p>


<h3 class="fn"><a name="addRow-3" />QFormLayout.addRow (<i>self</i>, QString&#160;<i>labelText</i>, <a href="qwidget.html">QWidget</a>&#160;<i>field</i>)</h3><p>The <i>field</i> argument has it's ownership transferred to Qt.</p><p>This is an overloaded function.</p>
<p>This overload automatically creates a <a href="qlabel.html">QLabel</a> behind the scenes with <i>labelText</i> as
its text. The <i>field</i> is set as the new <a href="qlabel.html">QLabel</a>'s <a href="qlabel.html#setBuddy">buddy</a>.</p>


<h3 class="fn"><a name="addRow-4" />QFormLayout.addRow (<i>self</i>, QString&#160;<i>labelText</i>, <a href="qlayout.html">QLayout</a>&#160;<i>field</i>)</h3><p>The <i>field</i> argument has it's ownership transferred to Qt.</p><p>This is an overloaded function.</p>
<p>This overload automatically creates a <a href="qlabel.html">QLabel</a> behind the scenes with <i>labelText</i> as
its text.</p>


<h3 class="fn"><a name="addRow-5" />QFormLayout.addRow (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>)</h3><p>The <i>widget</i> argument has it's ownership transferred to Qt.</p><p>This is an overloaded function.</p>
<p>Adds the specified <i>widget</i> at the end of this form layout.
The <i>widget</i> spans both columns.</p>


<h3 class="fn"><a name="addRow-6" />QFormLayout.addRow (<i>self</i>, <a href="qlayout.html">QLayout</a>&#160;<i>layout</i>)</h3><p>The <i>layout</i> argument has it's ownership transferred to Qt.</p><p>This is an overloaded function.</p>
<p>Adds the specified <i>layout</i> at the end of this form layout.
The <i>layout</i> spans both columns.</p>


<h3 class="fn"><a name="count" />int QFormLayout.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> QFormLayout.expandingDirections (<i>self</i>)</h3><p>Reimplemented from <a href="qlayoutitem.html#expandingDirections">QLayoutItem.expandingDirections</a>().</p>


<h3 class="fn"><a name="fieldGrowthPolicy" /><a href="qformlayout.html#FieldGrowthPolicy-enum">FieldGrowthPolicy</a> QFormLayout.fieldGrowthPolicy (<i>self</i>)</h3><h3 class="fn"><a name="formAlignment" /><a href="qt-alignment.html">Qt.Alignment</a> QFormLayout.formAlignment (<i>self</i>)</h3><h3 class="fn"><a name="getItemPosition" />(int&#160;<i>rowPtr</i>, <a href="qformlayout.html#ItemRole-enum">ItemRole</a>&#160;<i>rolePtr</i>) QFormLayout.getItemPosition (<i>self</i>, int&#160;<i>index</i>)</h3><p>Retrieves the row and role (column) of the item at the specified
<i>index</i>. If <i>index</i> is out of bounds, *<i>rowPtr</i> is
set to -1; otherwise the row is stored in *<i>rowPtr</i> and the
role is stored in *<i>rolePtr</i>.</p>
<p><b>See also</b> <a href="qformlayout.html#itemAt">itemAt</a>(),
<a href="qformlayout.html#count">count</a>(), <a href="qformlayout.html#getLayoutPosition">getLayoutPosition</a>(), and
<a href="qformlayout.html#getWidgetPosition">getWidgetPosition</a>().</p>


<h3 class="fn"><a name="getLayoutPosition" />(int&#160;<i>rowPtr</i>, <a href="qformlayout.html#ItemRole-enum">ItemRole</a>&#160;<i>rolePtr</i>) QFormLayout.getLayoutPosition (<i>self</i>, <a href="qlayout.html">QLayout</a>&#160;<i>layout</i>)</h3><p>Retrieves the row and role (column) of the specified child
<i>layout</i>. If <i>layout</i> is not in the form layout,
*<i>rowPtr</i> is set to -1; otherwise the row is stored in
*<i>rowPtr</i> and the role is stored in *<i>rolePtr</i>.</p>


<h3 class="fn"><a name="getWidgetPosition" />(int&#160;<i>rowPtr</i>, <a href="qformlayout.html#ItemRole-enum">ItemRole</a>&#160;<i>rolePtr</i>) QFormLayout.getWidgetPosition (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>)</h3><p>Retrieves the row and role (column) of the specified
<i>widget</i> in the layout. If <i>widget</i> is not in the layout,
*<i>rowPtr</i> is set to -1; otherwise the row is stored in
*<i>rowPtr</i> and the role is stored in *<i>rolePtr</i>.</p>
<p><b>See also</b> <a href="qformlayout.html#getItemPosition">getItemPosition</a>() and
<a href="qformlayout.html#itemAt">itemAt</a>().</p>


<h3 class="fn"><a name="hasHeightForWidth" />bool QFormLayout.hasHeightForWidth (<i>self</i>)</h3><p>Reimplemented from <a href="qlayoutitem.html#hasHeightForWidth">QLayoutItem.hasHeightForWidth</a>().</p>


<h3 class="fn"><a name="heightForWidth" />int QFormLayout.heightForWidth (<i>self</i>, int&#160;<i>width</i>)</h3><p>Reimplemented from <a href="qlayoutitem.html#heightForWidth">QLayoutItem.heightForWidth</a>().</p>


<h3 class="fn"><a name="horizontalSpacing" />int QFormLayout.horizontalSpacing (<i>self</i>)</h3><h3 class="fn"><a name="insertRow" />QFormLayout.insertRow (<i>self</i>, int&#160;<i>row</i>, <a href="qwidget.html">QWidget</a>&#160;<i>label</i>, <a href="qwidget.html">QWidget</a>&#160;<i>field</i>)</h3><p>The <i>label</i> argument has it's ownership transferred to Qt.</p><p>The <i>field</i> argument has it's ownership transferred to Qt.</p><p>Inserts a new row at position <i>row</i> in this form layout,
with the given <i>label</i> and <i>field</i>. If <i>row</i> is out
of bounds, the new row is added at the end.</p>
<p><b>See also</b> <a href="qformlayout.html#addRow">addRow</a>().</p>


<h3 class="fn"><a name="insertRow-2" />QFormLayout.insertRow (<i>self</i>, int&#160;<i>row</i>, <a href="qwidget.html">QWidget</a>&#160;<i>label</i>, <a href="qlayout.html">QLayout</a>&#160;<i>field</i>)</h3><p>The <i>label</i> argument has it's ownership transferred to Qt.</p><p>The <i>field</i> argument has it's ownership transferred to Qt.</p><p>This is an overloaded function.</p>


<h3 class="fn"><a name="insertRow-3" />QFormLayout.insertRow (<i>self</i>, int&#160;<i>row</i>, QString&#160;<i>labelText</i>, <a href="qwidget.html">QWidget</a>&#160;<i>field</i>)</h3><p>The <i>field</i> argument has it's ownership transferred to Qt.</p><p>This is an overloaded function.</p>
<p>This overload automatically creates a <a href="qlabel.html">QLabel</a> behind the scenes with <i>labelText</i> as
its text. The <i>field</i> is set as the new <a href="qlabel.html">QLabel</a>'s <a href="qlabel.html#setBuddy">buddy</a>.</p>


<h3 class="fn"><a name="insertRow-4" />QFormLayout.insertRow (<i>self</i>, int&#160;<i>row</i>, QString&#160;<i>labelText</i>, <a href="qlayout.html">QLayout</a>&#160;<i>field</i>)</h3><p>The <i>field</i> argument has it's ownership transferred to Qt.</p><p>This is an overloaded function.</p>
<p>This overload automatically creates a <a href="qlabel.html">QLabel</a> behind the scenes with <i>labelText</i> as
its text.</p>


<h3 class="fn"><a name="insertRow-5" />QFormLayout.insertRow (<i>self</i>, int&#160;<i>row</i>, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>)</h3><p>The <i>widget</i> argument has it's ownership transferred to Qt.</p><p>This is an overloaded function.</p>
<p>Inserts the specified <i>widget</i> at position <i>row</i> in
this form layout. The <i>widget</i> spans both columns. If
<i>row</i> is out of bounds, the widget is added at the end.</p>


<h3 class="fn"><a name="insertRow-6" />QFormLayout.insertRow (<i>self</i>, int&#160;<i>row</i>, <a href="qlayout.html">QLayout</a>&#160;<i>layout</i>)</h3><p>The <i>layout</i> argument has it's ownership transferred to Qt.</p><p>This is an overloaded function.</p>
<p>Inserts the specified <i>layout</i> at position <i>row</i> in
this form layout. The <i>layout</i> spans both columns. If
<i>row</i> is out of bounds, the widget is added at the end.</p>


<h3 class="fn"><a name="invalidate" />QFormLayout.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> QFormLayout.itemAt (<i>self</i>, int&#160;<i>row</i>, <a href="qformlayout.html#ItemRole-enum">ItemRole</a>&#160;<i>role</i>)</h3><p>Returns the layout item in the given <i>row</i> with the
specified <i>role</i> (column). Returns 0 if there is no such
item.</p>
<p><b>See also</b> <a href="qlayout.html#itemAt">QLayout.itemAt</a>() and <a href="qformlayout.html#setItem">setItem</a>().</p>


<h3 class="fn"><a name="itemAt-2" /><a href="qlayoutitem.html">QLayoutItem</a> QFormLayout.itemAt (<i>self</i>, int&#160;<i>index</i>)</h3><p>Reimplemented from <a href="qlayout.html#itemAt">QLayout.itemAt</a>().</p>


<h3 class="fn"><a name="labelAlignment" /><a href="qt-alignment.html">Qt.Alignment</a> QFormLayout.labelAlignment (<i>self</i>)</h3><h3 class="fn"><a name="labelForField" /><a href="qwidget.html">QWidget</a> QFormLayout.labelForField (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>field</i>)</h3><p>Returns the label associated with the given <i>field</i>.</p>
<p><b>See also</b> <a href="qformlayout.html#itemAt">itemAt</a>().</p>


<h3 class="fn"><a name="labelForField-2" /><a href="qwidget.html">QWidget</a> QFormLayout.labelForField (<i>self</i>, <a href="qlayout.html">QLayout</a>&#160;<i>field</i>)</h3><p>This is an overloaded function.</p>


<h3 class="fn"><a name="minimumSize" /><a href="qsize.html">QSize</a> QFormLayout.minimumSize (<i>self</i>)</h3><p>Reimplemented from <a href="qlayoutitem.html#minimumSize">QLayoutItem.minimumSize</a>().</p>


<h3 class="fn"><a name="rowCount" />int QFormLayout.rowCount (<i>self</i>)</h3><p>Returns the number of rows in the form.</p>
<p><b>See also</b> <a href="qlayout.html#count">QLayout.count</a>().</p>


<h3 class="fn"><a name="rowWrapPolicy" /><a href="qformlayout.html#RowWrapPolicy-enum">RowWrapPolicy</a> QFormLayout.rowWrapPolicy (<i>self</i>)</h3><h3 class="fn"><a name="setFieldGrowthPolicy" />QFormLayout.setFieldGrowthPolicy (<i>self</i>, <a href="qformlayout.html#FieldGrowthPolicy-enum">FieldGrowthPolicy</a>&#160;<i>policy</i>)</h3><h3 class="fn"><a name="setFormAlignment" />QFormLayout.setFormAlignment (<i>self</i>, <a href="qt-alignment.html">Qt.Alignment</a>&#160;<i>alignment</i>)</h3><h3 class="fn"><a name="setGeometry" />QFormLayout.setGeometry (<i>self</i>, <a href="qrect.html">QRect</a>&#160;<i>rect</i>)</h3><p>Reimplemented from <a href="qlayoutitem.html#setGeometry">QLayoutItem.setGeometry</a>().</p>


<h3 class="fn"><a name="setHorizontalSpacing" />QFormLayout.setHorizontalSpacing (<i>self</i>, int&#160;<i>spacing</i>)</h3><h3 class="fn"><a name="setItem" />QFormLayout.setItem (<i>self</i>, int&#160;<i>row</i>, <a href="qformlayout.html#ItemRole-enum">ItemRole</a>&#160;<i>role</i>, <a href="qlayoutitem.html">QLayoutItem</a>&#160;<i>item</i>)</h3><p>The <i>item</i> argument has it's ownership transferred to Qt.</p><p>Sets the item in the given <i>row</i> for the given <i>role</i>
to <i>item</i>, extending the layout with empty rows if
necessary.</p>
<p>If the cell is already occupied, the <i>item</i> is not inserted
and an error message is sent to the console. The <i>item</i> spans
both columns.</p>
<p><b>Warning:</b> Do not use this function to add child layouts or
child widget items. Use <a href="qformlayout.html#setLayout">setLayout</a>() or <a href="qformlayout.html#setWidget">setWidget</a>() instead.</p>
<p><b>See also</b> <a href="qformlayout.html#setLayout">setLayout</a>().</p>


<h3 class="fn"><a name="setLabelAlignment" />QFormLayout.setLabelAlignment (<i>self</i>, <a href="qt-alignment.html">Qt.Alignment</a>&#160;<i>alignment</i>)</h3><h3 class="fn"><a name="setLayout" />QFormLayout.setLayout (<i>self</i>, int&#160;<i>row</i>, <a href="qformlayout.html#ItemRole-enum">ItemRole</a>&#160;<i>role</i>, <a href="qlayout.html">QLayout</a>&#160;<i>layout</i>)</h3><p>The <i>layout</i> argument has it's ownership transferred to Qt.</p><p>Sets the sub-layout in the given <i>row</i> for the given
<i>role</i> to <i>layout</i>, extending the form layout with empty
rows if necessary.</p>
<p>If the cell is already occupied, the <i>layout</i> is not
inserted and an error message is sent to the console.</p>
<p><b>Note:</b> For most applications, <a href="qformlayout.html#addRow">addRow</a>() or <a href="qformlayout.html#insertRow">insertRow</a>() should be used instead
of setLayout().</p>
<p><b>See also</b> <a href="qformlayout.html#setWidget">setWidget</a>().</p>


<h3 class="fn"><a name="setRowWrapPolicy" />QFormLayout.setRowWrapPolicy (<i>self</i>, <a href="qformlayout.html#RowWrapPolicy-enum">RowWrapPolicy</a>&#160;<i>policy</i>)</h3><h3 class="fn"><a name="setSpacing" />QFormLayout.setSpacing (<i>self</i>, int)</h3><p>This function sets both the vertical and horizontal spacing to
<i>spacing</i>.</p>
<p><b>See also</b> <a href="qformlayout.html#spacing">spacing</a>(), <a href="qformlayout.html#verticalSpacing-prop">setVerticalSpacing</a>(),
and <a href="qformlayout.html#horizontalSpacing-prop">setHorizontalSpacing</a>().</p>


<h3 class="fn"><a name="setVerticalSpacing" />QFormLayout.setVerticalSpacing (<i>self</i>, int&#160;<i>spacing</i>)</h3><h3 class="fn"><a name="setWidget" />QFormLayout.setWidget (<i>self</i>, int&#160;<i>row</i>, <a href="qformlayout.html#ItemRole-enum">ItemRole</a>&#160;<i>role</i>, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>)</h3><p>The <i>widget</i> argument has it's ownership transferred to Qt.</p><p>Sets the widget in the given <i>row</i> for the given
<i>role</i> to <i>widget</i>, extending the layout with empty rows
if necessary.</p>
<p>If the cell is already occupied, the <i>widget</i> is not
inserted and an error message is sent to the console.</p>
<p><b>Note:</b> For most applications, <a href="qformlayout.html#addRow">addRow</a>() or <a href="qformlayout.html#insertRow">insertRow</a>() should be used instead
of setWidget().</p>
<p><b>See also</b> <a href="qformlayout.html#setLayout">setLayout</a>().</p>


<h3 class="fn"><a name="sizeHint" /><a href="qsize.html">QSize</a> QFormLayout.sizeHint (<i>self</i>)</h3><p>Reimplemented from <a href="qlayoutitem.html#sizeHint">QLayoutItem.sizeHint</a>().</p>


<h3 class="fn"><a name="spacing" />int QFormLayout.spacing (<i>self</i>)</h3><p>If the vertical spacing is equal to the horizontal spacing, this
function returns that value; otherwise it returns -1.</p>
<p><b>See also</b> <a href="qformlayout.html#setSpacing">setSpacing</a>(), <a href="qformlayout.html#verticalSpacing-prop">verticalSpacing</a>(), and
<a href="qformlayout.html#horizontalSpacing-prop">horizontalSpacing</a>().</p>


<h3 class="fn"><a name="takeAt" /><a href="qlayoutitem.html">QLayoutItem</a> QFormLayout.takeAt (<i>self</i>, int&#160;<i>index</i>)</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 QFormLayout.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&#160;4.10.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.5</td></tr></table></div></address></body></html>