Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 5317

qt4-doc-4.8.7-26.2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qformlayout.cpp -->
  <title>Qt 4.8: QFormLayout Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtgui.html">QtGui</a></li>
<li>QFormLayout</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QFormLayout Class Reference</h1>
<!-- $$$QFormLayout-brief -->
<p>The QFormLayout class manages forms of input widgets and their associated labels. <a href="#details">More...</a></p>
<!-- @@@QFormLayout -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QFormLayout&gt;</span></pre><p><b>Inherits: </b><a href="qlayout.html">QLayout</a>.</p>
<p>This class was introduced in Qt 4.4.</p>
<ul>
<li><a href="qformlayout-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#FieldGrowthPolicy-enum">FieldGrowthPolicy</a></b> { FieldsStayAtSizeHint, ExpandingFieldsGrow, AllNonFixedFieldsGrow }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#ItemRole-enum">ItemRole</a></b> { LabelRole, FieldRole, SpanningRole }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#RowWrapPolicy-enum">RowWrapPolicy</a></b> { DontWrapRows, WrapLongRows, WrapAllRows }</td></tr>
</table>
<a name="properties"></a>
<h2>Properties</h2>
<table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><b><a href="qformlayout.html#fieldGrowthPolicy-prop">fieldGrowthPolicy</a></b> : FieldGrowthPolicy</li>
<li class="fn"><b><a href="qformlayout.html#formAlignment-prop">formAlignment</a></b> : Qt::Alignment</li>
<li class="fn"><b><a href="qformlayout.html#horizontalSpacing-prop">horizontalSpacing</a></b> : int</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="qformlayout.html#labelAlignment-prop">labelAlignment</a></b> : Qt::Alignment</li>
<li class="fn"><b><a href="qformlayout.html#rowWrapPolicy-prop">rowWrapPolicy</a></b> : RowWrapPolicy</li>
<li class="fn"><b><a href="qformlayout.html#verticalSpacing-prop">verticalSpacing</a></b> : int</li>
</ul>
</td></tr>
</table>
<ul>
<li class="fn">2 properties inherited from <a href="qlayout.html#properties">QLayout</a></li>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#QFormLayout">QFormLayout</a></b> ( QWidget * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#dtor.QFormLayout">~QFormLayout</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#addRow">addRow</a></b> ( QWidget * <i>label</i>, QWidget * <i>field</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#addRow-2">addRow</a></b> ( QWidget * <i>label</i>, QLayout * <i>field</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#addRow-3">addRow</a></b> ( const QString &amp; <i>labelText</i>, QWidget * <i>field</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#addRow-4">addRow</a></b> ( const QString &amp; <i>labelText</i>, QLayout * <i>field</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#addRow-5">addRow</a></b> ( QWidget * <i>widget</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#addRow-6">addRow</a></b> ( QLayout * <i>layout</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> FieldGrowthPolicy </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#fieldGrowthPolicy-prop">fieldGrowthPolicy</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::Alignment </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#formAlignment-prop">formAlignment</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#getItemPosition">getItemPosition</a></b> ( int <i>index</i>, int * <i>rowPtr</i>, ItemRole * <i>rolePtr</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#getLayoutPosition">getLayoutPosition</a></b> ( QLayout * <i>layout</i>, int * <i>rowPtr</i>, ItemRole * <i>rolePtr</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#getWidgetPosition">getWidgetPosition</a></b> ( QWidget * <i>widget</i>, int * <i>rowPtr</i>, ItemRole * <i>rolePtr</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#horizontalSpacing-prop">horizontalSpacing</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#insertRow">insertRow</a></b> ( int <i>row</i>, QWidget * <i>label</i>, QWidget * <i>field</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#insertRow-2">insertRow</a></b> ( int <i>row</i>, QWidget * <i>label</i>, QLayout * <i>field</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#insertRow-3">insertRow</a></b> ( int <i>row</i>, const QString &amp; <i>labelText</i>, QWidget * <i>field</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#insertRow-4">insertRow</a></b> ( int <i>row</i>, const QString &amp; <i>labelText</i>, QLayout * <i>field</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#insertRow-5">insertRow</a></b> ( int <i>row</i>, QWidget * <i>widget</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#insertRow-6">insertRow</a></b> ( int <i>row</i>, QLayout * <i>layout</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QLayoutItem * </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#itemAt">itemAt</a></b> ( int <i>row</i>, ItemRole <i>role</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::Alignment </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#labelAlignment-prop">labelAlignment</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWidget * </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#labelForField">labelForField</a></b> ( QWidget * <i>field</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWidget * </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#labelForField-2">labelForField</a></b> ( QLayout * <i>field</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#rowCount">rowCount</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> RowWrapPolicy </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#rowWrapPolicy-prop">rowWrapPolicy</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#fieldGrowthPolicy-prop">setFieldGrowthPolicy</a></b> ( FieldGrowthPolicy <i>policy</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#formAlignment-prop">setFormAlignment</a></b> ( Qt::Alignment <i>alignment</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#horizontalSpacing-prop">setHorizontalSpacing</a></b> ( int <i>spacing</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#setItem">setItem</a></b> ( int <i>row</i>, ItemRole <i>role</i>, QLayoutItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#labelAlignment-prop">setLabelAlignment</a></b> ( Qt::Alignment <i>alignment</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#setLayout">setLayout</a></b> ( int <i>row</i>, ItemRole <i>role</i>, QLayout * <i>layout</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#rowWrapPolicy-prop">setRowWrapPolicy</a></b> ( RowWrapPolicy <i>policy</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#setSpacing">setSpacing</a></b> ( int <i>spacing</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#verticalSpacing-prop">setVerticalSpacing</a></b> ( int <i>spacing</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#setWidget">setWidget</a></b> ( int <i>row</i>, ItemRole <i>role</i>, QWidget * <i>widget</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#spacing">spacing</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#verticalSpacing-prop">verticalSpacing</a></b> () const</td></tr>
</table>
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#addItem">addItem</a></b> ( QLayoutItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#count">count</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual Qt::Orientations </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#expandingDirections">expandingDirections</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#hasHeightForWidth">hasHeightForWidth</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#heightForWidth">heightForWidth</a></b> ( int <i>width</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#invalidate">invalidate</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QLayoutItem * </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#itemAt-2">itemAt</a></b> ( int <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSize </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#minimumSize">minimumSize</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#setGeometry">setGeometry</a></b> ( const QRect &amp; <i>rect</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSize </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#sizeHint">sizeHint</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QLayoutItem * </td><td class="memItemRight bottomAlign"><b><a href="qformlayout.html#takeAt">takeAt</a></b> ( int <i>index</i> )</td></tr>
</table>
<ul>
<li class="fn">35 public functions inherited from <a href="qlayout.html#public-functions">QLayout</a></li>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li class="fn">17 public functions inherited from <a href="qlayoutitem.html#public-functions">QLayoutItem</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
<li class="fn">1 static public member inherited from <a href="qlayout.html#static-public-members">QLayout</a></li>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li class="fn">4 protected functions inherited from <a href="qlayout.html#protected-functions">QLayout</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QFormLayout-description -->
<div class="descr">
<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 &quot;field&quot; widgets (line editors, spin boxes, etc.)&#x2e;</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">&quot;&amp;Name:&quot;</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">&quot;&amp;Email:&quot;</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">&quot;&amp;Age:&quot;</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">&quot;&amp;Name:&quot;</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">&quot;&amp;Name:&quot;</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">&quot;&amp;Name:&quot;</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 valign="top" class="odd"><td ><img src="images/qformlayout-win.png" alt="" /></td><td ><img src="images/qformlayout-mac.png" alt="" /></td><td ><img src="images/qformlayout-kde.png" alt="" /></td><td ><img src="images/qformlayout-qpe.png" alt="" /></td></tr>
<tr valign="top" class="even"><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>
</div>
<p><b>See also </b><a href="qgridlayout.html">QGridLayout</a>, <a href="qboxlayout.html">QBoxLayout</a>, and <a href="qstackedlayout.html">QStackedLayout</a>.</p>
<!-- @@@QFormLayout -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$FieldGrowthPolicy$$$FieldsStayAtSizeHint$$$ExpandingFieldsGrow$$$AllNonFixedFieldsGrow -->
<h3 class="fn"><a name="FieldGrowthPolicy-enum"></a>enum QFormLayout::<span class="name">FieldGrowthPolicy</span></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 valign="top" class="odd"><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>
<!-- @@@FieldGrowthPolicy -->
<!-- $$$ItemRole$$$LabelRole$$$FieldRole$$$SpanningRole -->
<h3 class="fn"><a name="ItemRole-enum"></a>enum QFormLayout::<span class="name">ItemRole</span></h3>
<p>This enum specifies the types of widgets (or other layout items) that may appear in a row.</p>
<table class="valuelist"><tr valign="top" class="odd"><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>
<!-- @@@ItemRole -->
<!-- $$$RowWrapPolicy$$$DontWrapRows$$$WrapLongRows$$$WrapAllRows -->
<h3 class="fn"><a name="RowWrapPolicy-enum"></a>enum QFormLayout::<span class="name">RowWrapPolicy</span></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 valign="top" class="odd"><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>
<!-- @@@RowWrapPolicy -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$fieldGrowthPolicy-prop$$$fieldGrowthPolicy$$$setFieldGrowthPolicyFieldGrowthPolicy -->
<h3 class="fn"><a name="fieldGrowthPolicy-prop"></a><span class="name">fieldGrowthPolicy</span> : <span class="type"><a href="qformlayout.html#FieldGrowthPolicy-enum">FieldGrowthPolicy</a></span></h3>
<p>This property holds the way in which the form's fields grow.</p>
<p>The default value depends on the widget or application style. For <a href="qmacstyle.html">QMacStyle</a>, the default is <a href="qformlayout.html#FieldGrowthPolicy-enum">FieldsStayAtSizeHint</a>; for <a href="qcommonstyle.html">QCommonStyle</a> derived styles (like Plastique and Windows), the default is <a href="qformlayout.html#FieldGrowthPolicy-enum">ExpandingFieldsGrow</a>; for Qt Extended styles, the default is <a href="qformlayout.html#FieldGrowthPolicy-enum">AllNonFixedFieldsGrow</a>.</p>
<p>If none of the fields can grow and the form is resized, extra space is distributed according to the current <a href="qformlayout.html#formAlignment-prop">form alignment</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> FieldGrowthPolicy </td><td class="memItemRight bottomAlign"><span class="name"><b>fieldGrowthPolicy</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setFieldGrowthPolicy</b></span> ( FieldGrowthPolicy <i>policy</i> )</td></tr>
</table>
<p><b>See also </b><a href="qformlayout.html#formAlignment-prop">formAlignment</a> and <a href="qformlayout.html#rowWrapPolicy-prop">rowWrapPolicy</a>.</p>
<!-- @@@fieldGrowthPolicy -->
<!-- $$$formAlignment-prop$$$formAlignment$$$setFormAlignmentQt::Alignment -->
<h3 class="fn"><a name="formAlignment-prop"></a><span class="name">formAlignment</span> : <span class="type"><a href="qt.html#AlignmentFlag-enum">Qt::Alignment</a></span></h3>
<p>This property holds the alignment of the form layout's contents within the layout's geometry.</p>
<p>The default value depends on the widget or application style. For <a href="qmacstyle.html">QMacStyle</a>, the default is <a href="qt.html#AlignmentFlag-enum">Qt::AlignHCenter</a> | <a href="qt.html#AlignmentFlag-enum">Qt::AlignTop</a>; for the other styles, the default is <a href="qt.html#AlignmentFlag-enum">Qt::AlignLeft</a> | <a href="qt.html#AlignmentFlag-enum">Qt::AlignTop</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> Qt::Alignment </td><td class="memItemRight bottomAlign"><span class="name"><b>formAlignment</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setFormAlignment</b></span> ( Qt::Alignment <i>alignment</i> )</td></tr>
</table>
<p><b>See also </b><a href="qformlayout.html#labelAlignment-prop">labelAlignment</a> and <a href="qformlayout.html#rowWrapPolicy-prop">rowWrapPolicy</a>.</p>
<!-- @@@formAlignment -->
<!-- $$$horizontalSpacing-prop$$$horizontalSpacing$$$setHorizontalSpacingint -->
<h3 class="fn"><a name="horizontalSpacing-prop"></a><span class="name">horizontalSpacing</span> : <span class="type">int</span></h3>
<p>This property holds the spacing between widgets that are laid out side by side.</p>
<p>By default, if no value is explicitly set, the layout's horizontal spacing is inherited from the parent layout, or from the style settings for the parent widget.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>horizontalSpacing</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setHorizontalSpacing</b></span> ( int <i>spacing</i> )</td></tr>
</table>
<p><b>See also </b><a href="qformlayout.html#verticalSpacing-prop">verticalSpacing</a>, <a href="qstyle.html#pixelMetric">QStyle::pixelMetric</a>(), and <a href="qstyle.html#PixelMetric-enum">PM_LayoutHorizontalSpacing</a>.</p>
<!-- @@@horizontalSpacing -->
<!-- $$$labelAlignment-prop$$$labelAlignment$$$setLabelAlignmentQt::Alignment -->
<h3 class="fn"><a name="labelAlignment-prop"></a><span class="name">labelAlignment</span> : <span class="type"><a href="qt.html#AlignmentFlag-enum">Qt::Alignment</a></span></h3>
<p>This property holds the horizontal alignment of the labels.</p>
<p>The default value depends on the widget or application style. For <a href="qcommonstyle.html">QCommonStyle</a> derived styles, except for <a href="qplastiquestyle.html">QPlastiqueStyle</a>, the default is <a href="qt.html#AlignmentFlag-enum">Qt::AlignLeft</a>; for the other styles, the default is <a href="qt.html#AlignmentFlag-enum">Qt::AlignRight</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> Qt::Alignment </td><td class="memItemRight bottomAlign"><span class="name"><b>labelAlignment</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setLabelAlignment</b></span> ( Qt::Alignment <i>alignment</i> )</td></tr>
</table>
<p><b>See also </b><a href="qformlayout.html#formAlignment-prop">formAlignment</a>.</p>
<!-- @@@labelAlignment -->
<!-- $$$rowWrapPolicy-prop$$$rowWrapPolicy$$$setRowWrapPolicyRowWrapPolicy -->
<h3 class="fn"><a name="rowWrapPolicy-prop"></a><span class="name">rowWrapPolicy</span> : <span class="type"><a href="qformlayout.html#RowWrapPolicy-enum">RowWrapPolicy</a></span></h3>
<p>This property holds the way in which the form's rows wrap.</p>
<p>The default value depends on the widget or application style. For Qt Extended styles and <a href="qs60style.html">QS60Style</a>, the default is <a href="qformlayout.html#RowWrapPolicy-enum">WrapLongRows</a>; for the other styles, the default is <a href="qformlayout.html#RowWrapPolicy-enum">DontWrapRows</a>.</p>
<p>If you want to display each label above its associated field (instead of next to it), set this property to <a href="qformlayout.html#RowWrapPolicy-enum">WrapAllRows</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> RowWrapPolicy </td><td class="memItemRight bottomAlign"><span class="name"><b>rowWrapPolicy</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setRowWrapPolicy</b></span> ( RowWrapPolicy <i>policy</i> )</td></tr>
</table>
<p><b>See also </b><a href="qformlayout.html#fieldGrowthPolicy-prop">fieldGrowthPolicy</a>.</p>
<!-- @@@rowWrapPolicy -->
<!-- $$$verticalSpacing-prop$$$verticalSpacing$$$setVerticalSpacingint -->
<h3 class="fn"><a name="verticalSpacing-prop"></a><span class="name">verticalSpacing</span> : <span class="type">int</span></h3>
<p>This property holds the spacing between widgets that are laid out vertically.</p>
<p>By default, if no value is explicitly set, the layout's vertical spacing is inherited from the parent layout, or from the style settings for the parent widget.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>verticalSpacing</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setVerticalSpacing</b></span> ( int <i>spacing</i> )</td></tr>
</table>
<p><b>See also </b><a href="qformlayout.html#horizontalSpacing-prop">horizontalSpacing</a>, <a href="qstyle.html#pixelMetric">QStyle::pixelMetric</a>(), and <a href="qstyle.html#PixelMetric-enum">PM_LayoutHorizontalSpacing</a>.</p>
<!-- @@@verticalSpacing -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QFormLayout[overload1]$$$QFormLayoutQWidget* -->
<h3 class="fn"><a name="QFormLayout"></a>QFormLayout::<span class="name">QFormLayout</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0 )</h3>
<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>
<!-- @@@QFormLayout -->
<!-- $$$~QFormLayout[overload1]$$$~QFormLayout -->
<h3 class="fn"><a name="dtor.QFormLayout"></a>QFormLayout::<span class="name">~QFormLayout</span> ()</h3>
<p>Destroys the form layout.</p>
<!-- @@@~QFormLayout -->
<!-- $$$addItem[overload1]$$$addItemQLayoutItem* -->
<h3 class="fn"><a name="addItem"></a><span class="type">void</span> QFormLayout::<span class="name">addItem</span> ( <span class="type"><a href="qlayoutitem.html">QLayoutItem</a></span> * <i>item</i> )<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qlayout.html#addItem">QLayout::addItem</a>().</p>
<!-- @@@addItem -->
<!-- $$$addRow[overload1]$$$addRowQWidget*QWidget* -->
<h3 class="fn"><a name="addRow"></a><span class="type">void</span> QFormLayout::<span class="name">addRow</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>label</i>, <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>field</i> )</h3>
<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>
<!-- @@@addRow -->
<!-- $$$addRow$$$addRowQWidget*QLayout* -->
<h3 class="fn"><a name="addRow-2"></a><span class="type">void</span> QFormLayout::<span class="name">addRow</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>label</i>, <span class="type"><a href="qlayout.html">QLayout</a></span> * <i>field</i> )</h3>
<p>This is an overloaded function.</p>
<!-- @@@addRow -->
<!-- $$$addRow$$$addRowconstQString&QWidget* -->
<h3 class="fn"><a name="addRow-3"></a><span class="type">void</span> QFormLayout::<span class="name">addRow</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>labelText</i>, <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>field</i> )</h3>
<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>
<!-- @@@addRow -->
<!-- $$$addRow$$$addRowconstQString&QLayout* -->
<h3 class="fn"><a name="addRow-4"></a><span class="type">void</span> QFormLayout::<span class="name">addRow</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>labelText</i>, <span class="type"><a href="qlayout.html">QLayout</a></span> * <i>field</i> )</h3>
<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>
<!-- @@@addRow -->
<!-- $$$addRow$$$addRowQWidget* -->
<h3 class="fn"><a name="addRow-5"></a><span class="type">void</span> QFormLayout::<span class="name">addRow</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>widget</i> )</h3>
<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>
<!-- @@@addRow -->
<!-- $$$addRow$$$addRowQLayout* -->
<h3 class="fn"><a name="addRow-6"></a><span class="type">void</span> QFormLayout::<span class="name">addRow</span> ( <span class="type"><a href="qlayout.html">QLayout</a></span> * <i>layout</i> )</h3>
<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>
<!-- @@@addRow -->
<!-- $$$count[overload1]$$$count -->
<h3 class="fn"><a name="count"></a><span class="type">int</span> QFormLayout::<span class="name">count</span> () const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qlayout.html#count">QLayout::count</a>().</p>
<!-- @@@count -->
<!-- $$$expandingDirections[overload1]$$$expandingDirections -->
<h3 class="fn"><a name="expandingDirections"></a><span class="type"><a href="qt.html#Orientation-enum">Qt::Orientations</a></span> QFormLayout::<span class="name">expandingDirections</span> () const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qlayoutitem.html#expandingDirections">QLayoutItem::expandingDirections</a>().</p>
<!-- @@@expandingDirections -->
<!-- $$$getItemPosition[overload1]$$$getItemPositionintint*ItemRole* -->
<h3 class="fn"><a name="getItemPosition"></a><span class="type">void</span> QFormLayout::<span class="name">getItemPosition</span> ( <span class="type">int</span> <i>index</i>, <span class="type">int</span> * <i>rowPtr</i>, <span class="type"><a href="qformlayout.html#ItemRole-enum">ItemRole</a></span> * <i>rolePtr</i> ) const</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>
<!-- @@@getItemPosition -->
<!-- $$$getLayoutPosition[overload1]$$$getLayoutPositionQLayout*int*ItemRole* -->
<h3 class="fn"><a name="getLayoutPosition"></a><span class="type">void</span> QFormLayout::<span class="name">getLayoutPosition</span> ( <span class="type"><a href="qlayout.html">QLayout</a></span> * <i>layout</i>, <span class="type">int</span> * <i>rowPtr</i>, <span class="type"><a href="qformlayout.html#ItemRole-enum">ItemRole</a></span> * <i>rolePtr</i> ) const</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>
<!-- @@@getLayoutPosition -->
<!-- $$$getWidgetPosition[overload1]$$$getWidgetPositionQWidget*int*ItemRole* -->
<h3 class="fn"><a name="getWidgetPosition"></a><span class="type">void</span> QFormLayout::<span class="name">getWidgetPosition</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>widget</i>, <span class="type">int</span> * <i>rowPtr</i>, <span class="type"><a href="qformlayout.html#ItemRole-enum">ItemRole</a></span> * <i>rolePtr</i> ) const</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>
<!-- @@@getWidgetPosition -->
<!-- $$$hasHeightForWidth[overload1]$$$hasHeightForWidth -->
<h3 class="fn"><a name="hasHeightForWidth"></a><span class="type">bool</span> QFormLayout::<span class="name">hasHeightForWidth</span> () const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qlayoutitem.html#hasHeightForWidth">QLayoutItem::hasHeightForWidth</a>().</p>
<!-- @@@hasHeightForWidth -->
<!-- $$$heightForWidth[overload1]$$$heightForWidthint -->
<h3 class="fn"><a name="heightForWidth"></a><span class="type">int</span> QFormLayout::<span class="name">heightForWidth</span> ( <span class="type">int</span> <i>width</i> ) const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qlayoutitem.html#heightForWidth">QLayoutItem::heightForWidth</a>().</p>
<!-- @@@heightForWidth -->
<!-- $$$insertRow[overload1]$$$insertRowintQWidget*QWidget* -->
<h3 class="fn"><a name="insertRow"></a><span class="type">void</span> QFormLayout::<span class="name">insertRow</span> ( <span class="type">int</span> <i>row</i>, <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>label</i>, <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>field</i> )</h3>
<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>
<!-- @@@insertRow -->
<!-- $$$insertRow$$$insertRowintQWidget*QLayout* -->
<h3 class="fn"><a name="insertRow-2"></a><span class="type">void</span> QFormLayout::<span class="name">insertRow</span> ( <span class="type">int</span> <i>row</i>, <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>label</i>, <span class="type"><a href="qlayout.html">QLayout</a></span> * <i>field</i> )</h3>
<p>This is an overloaded function.</p>
<!-- @@@insertRow -->
<!-- $$$insertRow$$$insertRowintconstQString&QWidget* -->
<h3 class="fn"><a name="insertRow-3"></a><span class="type">void</span> QFormLayout::<span class="name">insertRow</span> ( <span class="type">int</span> <i>row</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>labelText</i>, <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>field</i> )</h3>
<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>
<!-- @@@insertRow -->
<!-- $$$insertRow$$$insertRowintconstQString&QLayout* -->
<h3 class="fn"><a name="insertRow-4"></a><span class="type">void</span> QFormLayout::<span class="name">insertRow</span> ( <span class="type">int</span> <i>row</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>labelText</i>, <span class="type"><a href="qlayout.html">QLayout</a></span> * <i>field</i> )</h3>
<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>
<!-- @@@insertRow -->
<!-- $$$insertRow$$$insertRowintQWidget* -->
<h3 class="fn"><a name="insertRow-5"></a><span class="type">void</span> QFormLayout::<span class="name">insertRow</span> ( <span class="type">int</span> <i>row</i>, <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>widget</i> )</h3>
<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>
<!-- @@@insertRow -->
<!-- $$$insertRow$$$insertRowintQLayout* -->
<h3 class="fn"><a name="insertRow-6"></a><span class="type">void</span> QFormLayout::<span class="name">insertRow</span> ( <span class="type">int</span> <i>row</i>, <span class="type"><a href="qlayout.html">QLayout</a></span> * <i>layout</i> )</h3>
<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>
<!-- @@@insertRow -->
<!-- $$$invalidate[overload1]$$$invalidate -->
<h3 class="fn"><a name="invalidate"></a><span class="type">void</span> QFormLayout::<span class="name">invalidate</span> ()<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qlayoutitem.html#invalidate">QLayoutItem::invalidate</a>().</p>
<!-- @@@invalidate -->
<!-- $$$itemAt[overload1]$$$itemAtintItemRole -->
<h3 class="fn"><a name="itemAt"></a><span class="type"><a href="qlayoutitem.html">QLayoutItem</a></span> * QFormLayout::<span class="name">itemAt</span> ( <span class="type">int</span> <i>row</i>, <span class="type"><a href="qformlayout.html#ItemRole-enum">ItemRole</a></span> <i>role</i> ) const</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>
<!-- @@@itemAt -->
<!-- $$$itemAt$$$itemAtint -->
<h3 class="fn"><a name="itemAt-2"></a><span class="type"><a href="qlayoutitem.html">QLayoutItem</a></span> * QFormLayout::<span class="name">itemAt</span> ( <span class="type">int</span> <i>index</i> ) const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qlayout.html#itemAt">QLayout::itemAt</a>().</p>
<!-- @@@itemAt -->
<!-- $$$labelForField[overload1]$$$labelForFieldQWidget* -->
<h3 class="fn"><a name="labelForField"></a><span class="type"><a href="qwidget.html">QWidget</a></span> * QFormLayout::<span class="name">labelForField</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>field</i> ) const</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>
<!-- @@@labelForField -->
<!-- $$$labelForField$$$labelForFieldQLayout* -->
<h3 class="fn"><a name="labelForField-2"></a><span class="type"><a href="qwidget.html">QWidget</a></span> * QFormLayout::<span class="name">labelForField</span> ( <span class="type"><a href="qlayout.html">QLayout</a></span> * <i>field</i> ) const</h3>
<p>This is an overloaded function.</p>
<!-- @@@labelForField -->
<!-- $$$minimumSize[overload1]$$$minimumSize -->
<h3 class="fn"><a name="minimumSize"></a><span class="type"><a href="qsize.html">QSize</a></span> QFormLayout::<span class="name">minimumSize</span> () const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qlayoutitem.html#minimumSize">QLayoutItem::minimumSize</a>().</p>
<!-- @@@minimumSize -->
<!-- $$$rowCount[overload1]$$$rowCount -->
<h3 class="fn"><a name="rowCount"></a><span class="type">int</span> QFormLayout::<span class="name">rowCount</span> () const</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>
<!-- @@@rowCount -->
<!-- $$$setGeometry[overload1]$$$setGeometryconstQRect& -->
<h3 class="fn"><a name="setGeometry"></a><span class="type">void</span> QFormLayout::<span class="name">setGeometry</span> ( const <span class="type"><a href="qrect.html">QRect</a></span> &amp; <i>rect</i> )<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qlayoutitem.html#setGeometry">QLayoutItem::setGeometry</a>().</p>
<!-- @@@setGeometry -->
<!-- $$$setItem[overload1]$$$setItemintItemRoleQLayoutItem* -->
<h3 class="fn"><a name="setItem"></a><span class="type">void</span> QFormLayout::<span class="name">setItem</span> ( <span class="type">int</span> <i>row</i>, <span class="type"><a href="qformlayout.html#ItemRole-enum">ItemRole</a></span> <i>role</i>, <span class="type"><a href="qlayoutitem.html">QLayoutItem</a></span> * <i>item</i> )</h3>
<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>
<!-- @@@setItem -->
<!-- $$$setLayout[overload1]$$$setLayoutintItemRoleQLayout* -->
<h3 class="fn"><a name="setLayout"></a><span class="type">void</span> QFormLayout::<span class="name">setLayout</span> ( <span class="type">int</span> <i>row</i>, <span class="type"><a href="qformlayout.html#ItemRole-enum">ItemRole</a></span> <i>role</i>, <span class="type"><a href="qlayout.html">QLayout</a></span> * <i>layout</i> )</h3>
<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>
<!-- @@@setLayout -->
<!-- $$$setSpacing[overload1]$$$setSpacingint -->
<h3 class="fn"><a name="setSpacing"></a><span class="type">void</span> QFormLayout::<span class="name">setSpacing</span> ( <span class="type">int</span> <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="qformlayout.html#spacing">spacing</a>(), <a href="qformlayout.html#verticalSpacing-prop">setVerticalSpacing</a>(), and <a href="qformlayout.html#horizontalSpacing-prop">setHorizontalSpacing</a>().</p>
<!-- @@@setSpacing -->
<!-- $$$setWidget[overload1]$$$setWidgetintItemRoleQWidget* -->
<h3 class="fn"><a name="setWidget"></a><span class="type">void</span> QFormLayout::<span class="name">setWidget</span> ( <span class="type">int</span> <i>row</i>, <span class="type"><a href="qformlayout.html#ItemRole-enum">ItemRole</a></span> <i>role</i>, <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>widget</i> )</h3>
<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>
<!-- @@@setWidget -->
<!-- $$$sizeHint[overload1]$$$sizeHint -->
<h3 class="fn"><a name="sizeHint"></a><span class="type"><a href="qsize.html">QSize</a></span> QFormLayout::<span class="name">sizeHint</span> () const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qlayoutitem.html#sizeHint">QLayoutItem::sizeHint</a>().</p>
<!-- @@@sizeHint -->
<!-- $$$spacing[overload1]$$$spacing -->
<h3 class="fn"><a name="spacing"></a><span class="type">int</span> QFormLayout::<span class="name">spacing</span> () const</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>
<!-- @@@spacing -->
<!-- $$$takeAt[overload1]$$$takeAtint -->
<h3 class="fn"><a name="takeAt"></a><span class="type"><a href="qlayoutitem.html">QLayoutItem</a></span> * QFormLayout::<span class="name">takeAt</span> ( <span class="type">int</span> <i>index</i> )<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qlayout.html#takeAt">QLayout::takeAt</a>().</p>
<!-- @@@takeAt -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
      Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Qt and respective logos are trademarks of The Qt Company Ltd 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>