Sophie

Sophie

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

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" />
<!-- qsizepolicy.qdoc -->
  <title>Qt 4.8: QSizePolicy 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>QSizePolicy</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="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#related-non-members">Related Non-Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QSizePolicy Class Reference</h1>
<!-- $$$QSizePolicy-brief -->
<p>The QSizePolicy class is a layout attribute describing horizontal and vertical resizing policy. <a href="#details">More...</a></p>
<!-- @@@QSizePolicy -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QSizePolicy&gt;</span></pre><ul>
<li><a href="qsizepolicy-members.html">List of all members, including inherited members</a></li>
<li><a href="qsizepolicy-qt3.html">Qt 3 support 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="qsizepolicy.html#ControlType-enum">ControlType</a></b> { DefaultType, ButtonBox, CheckBox, ComboBox, ..., ToolButton }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qsizepolicy.html#ControlType-enum">ControlTypes</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qsizepolicy.html#Policy-enum">Policy</a></b> { Fixed, Minimum, Maximum, Preferred, ..., Ignored }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qsizepolicy.html#PolicyFlag-enum">PolicyFlag</a></b> { GrowFlag, ExpandFlag, ShrinkFlag, IgnoreFlag }</td></tr>
</table>
<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="qsizepolicy.html#QSizePolicy">QSizePolicy</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsizepolicy.html#QSizePolicy-2">QSizePolicy</a></b> ( Policy <i>horizontal</i>, Policy <i>vertical</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsizepolicy.html#QSizePolicy-3">QSizePolicy</a></b> ( Policy <i>horizontal</i>, Policy <i>vertical</i>, ControlType <i>type</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> ControlType </td><td class="memItemRight bottomAlign"><b><a href="qsizepolicy.html#controlType">controlType</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::Orientations </td><td class="memItemRight bottomAlign"><b><a href="qsizepolicy.html#expandingDirections">expandingDirections</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qsizepolicy.html#hasHeightForWidth">hasHeightForWidth</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qsizepolicy.html#hasWidthForHeight">hasWidthForHeight</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Policy </td><td class="memItemRight bottomAlign"><b><a href="qsizepolicy.html#horizontalPolicy">horizontalPolicy</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qsizepolicy.html#horizontalStretch">horizontalStretch</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsizepolicy.html#setControlType">setControlType</a></b> ( ControlType <i>type</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsizepolicy.html#setHeightForWidth">setHeightForWidth</a></b> ( bool <i>dependent</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsizepolicy.html#setHorizontalPolicy">setHorizontalPolicy</a></b> ( Policy <i>policy</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsizepolicy.html#setHorizontalStretch">setHorizontalStretch</a></b> ( uchar <i>stretchFactor</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsizepolicy.html#setVerticalPolicy">setVerticalPolicy</a></b> ( Policy <i>policy</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsizepolicy.html#setVerticalStretch">setVerticalStretch</a></b> ( uchar <i>stretchFactor</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsizepolicy.html#setWidthForHeight">setWidthForHeight</a></b> ( bool <i>dependent</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsizepolicy.html#transpose">transpose</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Policy </td><td class="memItemRight bottomAlign"><b><a href="qsizepolicy.html#verticalPolicy">verticalPolicy</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qsizepolicy.html#verticalStretch">verticalStretch</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsizepolicy.html#operator-QVariant">operator QVariant</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qsizepolicy.html#operator-not-eq">operator!=</a></b> ( const QSizePolicy &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qsizepolicy.html#operator-eq-eq">operator==</a></b> ( const QSizePolicy &amp; <i>other</i> ) const</td></tr>
</table>
<a name="related-non-members"></a>
<h2>Related Non-Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QDataStream &amp; </td><td class="memItemRight bottomAlign"><b><a href="qsizepolicy.html#operator-lt-lt-133">operator&lt;&lt;</a></b> ( QDataStream &amp; <i>stream</i>, const QSizePolicy &amp; <i>policy</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDataStream &amp; </td><td class="memItemRight bottomAlign"><b><a href="qsizepolicy.html#operator-gt-gt-69">operator&gt;&gt;</a></b> ( QDataStream &amp; <i>stream</i>, QSizePolicy &amp; <i>policy</i> )</td></tr>
</table>
<a name="details"></a>
<!-- $$$QSizePolicy-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QSizePolicy class is a layout attribute describing horizontal and vertical resizing policy.</p>
<p>The size policy of a widget is an expression of its willingness to be resized in various ways, and affects how the widget is treated by the <a href="layout.html">layout engine</a>. Each widget returns a QSizePolicy that describes the horizontal and vertical resizing policy it prefers when being laid out. You can change this for a specific widget by changing its <a href="qwidget.html#sizePolicy-prop">QWidget::sizePolicy</a> property.</p>
<p>QSizePolicy contains two independent <a href="qsizepolicy.html#Policy-enum">QSizePolicy::Policy</a> values and two stretch factors; one describes the widgets's horizontal size policy, and the other describes its vertical size policy. It also contains a flag to indicate whether the height and width of its preferred size are related.</p>
<p>The horizontal and vertical policies can be set in the constructor, and altered using the <a href="qsizepolicy.html#setHorizontalPolicy">setHorizontalPolicy</a>() and <a href="qsizepolicy.html#setVerticalPolicy">setVerticalPolicy</a>() functions. The stretch factors can be set using the <a href="qsizepolicy.html#setHorizontalStretch">setHorizontalStretch</a>() and <a href="qsizepolicy.html#setVerticalStretch">setVerticalStretch</a>() functions. The flag indicating whether the widget's <a href="qwidget.html#sizeHint-prop">sizeHint()</a> is width-dependent (such as a menu bar or a word-wrapping label) can be set using the <a href="qsizepolicy.html#setHeightForWidth">setHeightForWidth</a>() function.</p>
<p>The current size policies and stretch factors be retrieved using the <a href="qsizepolicy.html#horizontalPolicy">horizontalPolicy</a>(), <a href="qsizepolicy.html#verticalPolicy">verticalPolicy</a>(), <a href="qsizepolicy.html#horizontalStretch">horizontalStretch</a>() and <a href="qsizepolicy.html#verticalStretch">verticalStretch</a>() functions. Alternatively, use the <a href="qsizepolicy.html#transpose">transpose</a>() function to swap the horizontal and vertical policies and stretches. The <a href="qsizepolicy.html#hasHeightForWidth">hasHeightForWidth</a>() function returns the current status of the flag indicating the size hint dependencies.</p>
<p>Use the <a href="qsizepolicy.html#expandingDirections">expandingDirections</a>() function to determine whether the associated widget can make use of more space than its <a href="qwidget.html#sizeHint-prop">sizeHint()</a> function indicates, as well as find out in which directions it can expand.</p>
<p>Finally, the QSizePolicy class provides operators comparing this size policy to a given policy, as well as a <a href="qvariant.html">QVariant</a> operator storing this QSizePolicy as a <a href="qvariant.html">QVariant</a> object.</p>
</div>
<p><b>See also </b><a href="qsize.html">QSize</a>, <a href="qwidget.html#sizeHint-prop">QWidget::sizeHint</a>(), <a href="qwidget.html#sizePolicy-prop">QWidget::sizePolicy</a>, and <a href="qlayoutitem.html#sizeHint">QLayoutItem::sizeHint</a>().</p>
<!-- @@@QSizePolicy -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$ControlType$$$DefaultType$$$ButtonBox$$$CheckBox$$$ComboBox$$$Frame$$$GroupBox$$$Label$$$Line$$$LineEdit$$$PushButton$$$RadioButton$$$Slider$$$SpinBox$$$TabWidget$$$ToolButton -->
<h3 class="flags"><a name="ControlType-enum"></a>enum QSizePolicy::<span class="name">ControlType</span><br/>flags QSizePolicy::<span class="name">ControlTypes</span></h3>
<p>This enum specifies the different types of widgets in terms of layout interaction:</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>QSizePolicy::DefaultType</tt></td><td class="topAlign"><tt>0x00000001</tt></td><td class="topAlign">The default type, when none is specified.</td></tr>
<tr><td class="topAlign"><tt>QSizePolicy::ButtonBox</tt></td><td class="topAlign"><tt>0x00000002</tt></td><td class="topAlign">A <a href="qdialogbuttonbox.html">QDialogButtonBox</a> instance.</td></tr>
<tr><td class="topAlign"><tt>QSizePolicy::CheckBox</tt></td><td class="topAlign"><tt>0x00000004</tt></td><td class="topAlign">A <a href="qcheckbox.html">QCheckBox</a> instance.</td></tr>
<tr><td class="topAlign"><tt>QSizePolicy::ComboBox</tt></td><td class="topAlign"><tt>0x00000008</tt></td><td class="topAlign">A <a href="qcombobox.html">QComboBox</a> instance.</td></tr>
<tr><td class="topAlign"><tt>QSizePolicy::Frame</tt></td><td class="topAlign"><tt>0x00000010</tt></td><td class="topAlign">A <a href="qframe.html">QFrame</a> instance.</td></tr>
<tr><td class="topAlign"><tt>QSizePolicy::GroupBox</tt></td><td class="topAlign"><tt>0x00000020</tt></td><td class="topAlign">A <a href="qgroupbox.html">QGroupBox</a> instance.</td></tr>
<tr><td class="topAlign"><tt>QSizePolicy::Label</tt></td><td class="topAlign"><tt>0x00000040</tt></td><td class="topAlign">A <a href="qlabel.html">QLabel</a> instance.</td></tr>
<tr><td class="topAlign"><tt>QSizePolicy::Line</tt></td><td class="topAlign"><tt>0x00000080</tt></td><td class="topAlign">A <a href="qframe.html">QFrame</a> instance with <a href="qframe.html#Shape-enum">QFrame::HLine</a> or <a href="qframe.html#Shape-enum">QFrame::VLine</a>.</td></tr>
<tr><td class="topAlign"><tt>QSizePolicy::LineEdit</tt></td><td class="topAlign"><tt>0x00000100</tt></td><td class="topAlign">A <a href="qlineedit.html">QLineEdit</a> instance.</td></tr>
<tr><td class="topAlign"><tt>QSizePolicy::PushButton</tt></td><td class="topAlign"><tt>0x00000200</tt></td><td class="topAlign">A <a href="qpushbutton.html">QPushButton</a> instance.</td></tr>
<tr><td class="topAlign"><tt>QSizePolicy::RadioButton</tt></td><td class="topAlign"><tt>0x00000400</tt></td><td class="topAlign">A <a href="qradiobutton.html">QRadioButton</a> instance.</td></tr>
<tr><td class="topAlign"><tt>QSizePolicy::Slider</tt></td><td class="topAlign"><tt>0x00000800</tt></td><td class="topAlign">A <a href="qabstractslider.html">QAbstractSlider</a> instance.</td></tr>
<tr><td class="topAlign"><tt>QSizePolicy::SpinBox</tt></td><td class="topAlign"><tt>0x00001000</tt></td><td class="topAlign">A <a href="qabstractspinbox.html">QAbstractSpinBox</a> instance.</td></tr>
<tr><td class="topAlign"><tt>QSizePolicy::TabWidget</tt></td><td class="topAlign"><tt>0x00002000</tt></td><td class="topAlign">A <a href="qtabwidget.html">QTabWidget</a> instance.</td></tr>
<tr><td class="topAlign"><tt>QSizePolicy::ToolButton</tt></td><td class="topAlign"><tt>0x00004000</tt></td><td class="topAlign">A <a href="qtoolbutton.html">QToolButton</a> instance.</td></tr>
</table>
<p>This enum was introduced or modified in Qt 4.3.</p>
<p>The ControlTypes type is a typedef for <a href="qflags.html">QFlags</a>&lt;ControlType&gt;. It stores an OR combination of ControlType values.</p>
<p><b>See also </b><a href="qsizepolicy.html#setControlType">setControlType</a>() and <a href="qsizepolicy.html#controlType">controlType</a>().</p>
<!-- @@@ControlType -->
<!-- $$$Policy$$$Fixed$$$Minimum$$$Maximum$$$Preferred$$$MinimumExpanding$$$Expanding$$$Ignored -->
<h3 class="fn"><a name="Policy-enum"></a>enum QSizePolicy::<span class="name">Policy</span></h3>
<p>This enum describes the various per-dimension sizing types used when constructing a <a href="qsizepolicy.html">QSizePolicy</a>.</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>QSizePolicy::Fixed</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The <a href="qwidget.html#sizeHint-prop">QWidget::sizeHint</a>() is the only acceptable alternative, so the widget can never grow or shrink (e.g&#x2e; the vertical direction of a push button).</td></tr>
<tr><td class="topAlign"><tt>QSizePolicy::Minimum</tt></td><td class="topAlign"><tt>GrowFlag</tt></td><td class="topAlign">The sizeHint() is minimal, and sufficient. The widget can be expanded, but there is no advantage to it being larger (e.g&#x2e; the horizontal direction of a push button). It cannot be smaller than the size provided by sizeHint().</td></tr>
<tr><td class="topAlign"><tt>QSizePolicy::Maximum</tt></td><td class="topAlign"><tt>ShrinkFlag</tt></td><td class="topAlign">The sizeHint() is a maximum. The widget can be shrunk any amount without detriment if other widgets need the space (e.g&#x2e; a separator line). It cannot be larger than the size provided by sizeHint().</td></tr>
<tr><td class="topAlign"><tt>QSizePolicy::Preferred</tt></td><td class="topAlign"><tt>GrowFlag | ShrinkFlag</tt></td><td class="topAlign">The sizeHint() is best, but the widget can be shrunk and still be useful. The widget can be expanded, but there is no advantage to it being larger than sizeHint() (the default <a href="qwidget.html">QWidget</a> policy).</td></tr>
<tr><td class="topAlign"><tt>QSizePolicy::Expanding</tt></td><td class="topAlign"><tt>GrowFlag | ShrinkFlag | ExpandFlag</tt></td><td class="topAlign">The sizeHint() is a sensible size, but the widget can be shrunk and still be useful. The widget can make use of extra space, so it should get as much space as possible (e.g&#x2e; the horizontal direction of a horizontal slider).</td></tr>
<tr><td class="topAlign"><tt>QSizePolicy::MinimumExpanding</tt></td><td class="topAlign"><tt>GrowFlag | ExpandFlag</tt></td><td class="topAlign">The sizeHint() is minimal, and sufficient. The widget can make use of extra space, so it should get as much space as possible (e.g&#x2e; the horizontal direction of a horizontal slider).</td></tr>
<tr><td class="topAlign"><tt>QSizePolicy::Ignored</tt></td><td class="topAlign"><tt>ShrinkFlag | GrowFlag | IgnoreFlag</tt></td><td class="topAlign">The sizeHint() is ignored. The widget will get as much space as possible.</td></tr>
</table>
<p><b>See also </b><a href="qsizepolicy.html#PolicyFlag-enum">PolicyFlag</a>, <a href="qsizepolicy.html#setHorizontalPolicy">setHorizontalPolicy</a>(), and <a href="qsizepolicy.html#setVerticalPolicy">setVerticalPolicy</a>().</p>
<!-- @@@Policy -->
<!-- $$$PolicyFlag$$$GrowFlag$$$ExpandFlag$$$ShrinkFlag$$$IgnoreFlag -->
<h3 class="fn"><a name="PolicyFlag-enum"></a>enum QSizePolicy::<span class="name">PolicyFlag</span></h3>
<p>These flags are combined together to form the various <a href="qsizepolicy.html#Policy-enum">Policy</a> values:</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>QSizePolicy::GrowFlag</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The widget can grow beyond its size hint if necessary.</td></tr>
<tr><td class="topAlign"><tt>QSizePolicy::ExpandFlag</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The widget should get as much space as possible.</td></tr>
<tr><td class="topAlign"><tt>QSizePolicy::ShrinkFlag</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">The widget can shrink below its size hint if necessary.</td></tr>
<tr><td class="topAlign"><tt>QSizePolicy::IgnoreFlag</tt></td><td class="topAlign"><tt>8</tt></td><td class="topAlign">The widget's size hint is ignored. The widget will get as much space as possible.</td></tr>
</table>
<p><b>See also </b><a href="qsizepolicy.html#Policy-enum">Policy</a>.</p>
<!-- @@@PolicyFlag -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QSizePolicy[overload1]$$$QSizePolicy -->
<h3 class="fn"><a name="QSizePolicy"></a>QSizePolicy::<span class="name">QSizePolicy</span> ()</h3>
<p>Constructs a <a href="qsizepolicy.html">QSizePolicy</a> object with <a href="qsizepolicy.html#Policy-enum">Fixed</a> as its horizontal and vertical policies.</p>
<p>The policies can be altered using the <a href="qsizepolicy.html#setHorizontalPolicy">setHorizontalPolicy</a>() and <a href="qsizepolicy.html#setVerticalPolicy">setVerticalPolicy</a>() functions. Use the <a href="qsizepolicy.html#setHeightForWidth">setHeightForWidth</a>() function if the preferred height of the widget is dependent on the width of the widget (for example, a <a href="qlabel.html">QLabel</a> with line wrapping).</p>
<p><b>See also </b><a href="qsizepolicy.html#setHorizontalStretch">setHorizontalStretch</a>() and <a href="qsizepolicy.html#setVerticalStretch">setVerticalStretch</a>().</p>
<!-- @@@QSizePolicy -->
<!-- $$$QSizePolicy$$$QSizePolicyPolicyPolicy -->
<h3 class="fn"><a name="QSizePolicy-2"></a>QSizePolicy::<span class="name">QSizePolicy</span> ( <span class="type"><a href="qsizepolicy.html#Policy-enum">Policy</a></span> <i>horizontal</i>, <span class="type"><a href="qsizepolicy.html#Policy-enum">Policy</a></span> <i>vertical</i> )</h3>
<p>Constructs a <a href="qsizepolicy.html">QSizePolicy</a> object with the given <i>horizontal</i> and <i>vertical</i> policies, and <a href="qsizepolicy.html#ControlType-enum">DefaultType</a> as the control type.</p>
<p>Use <a href="qsizepolicy.html#setHeightForWidth">setHeightForWidth</a>() if the preferred height of the widget is dependent on the width of the widget (for example, a <a href="qlabel.html">QLabel</a> with line wrapping).</p>
<p><b>See also </b><a href="qsizepolicy.html#setHorizontalStretch">setHorizontalStretch</a>() and <a href="qsizepolicy.html#setVerticalStretch">setVerticalStretch</a>().</p>
<!-- @@@QSizePolicy -->
<!-- $$$QSizePolicy$$$QSizePolicyPolicyPolicyControlType -->
<h3 class="fn"><a name="QSizePolicy-3"></a>QSizePolicy::<span class="name">QSizePolicy</span> ( <span class="type"><a href="qsizepolicy.html#Policy-enum">Policy</a></span> <i>horizontal</i>, <span class="type"><a href="qsizepolicy.html#Policy-enum">Policy</a></span> <i>vertical</i>, <span class="type"><a href="qsizepolicy.html#ControlType-enum">ControlType</a></span> <i>type</i> )</h3>
<p>Constructs a <a href="qsizepolicy.html">QSizePolicy</a> object with the given <i>horizontal</i> and <i>vertical</i> policies, and the specified control <i>type</i>.</p>
<p>Use <a href="qsizepolicy.html#setHeightForWidth">setHeightForWidth</a>() if the preferred height of the widget is dependent on the width of the widget (for example, a <a href="qlabel.html">QLabel</a> with line wrapping).</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also </b><a href="qsizepolicy.html#setHorizontalStretch">setHorizontalStretch</a>(), <a href="qsizepolicy.html#setVerticalStretch">setVerticalStretch</a>(), and <a href="qsizepolicy.html#controlType">controlType</a>().</p>
<!-- @@@QSizePolicy -->
<!-- $$$controlType[overload1]$$$controlType -->
<h3 class="fn"><a name="controlType"></a><span class="type"><a href="qsizepolicy.html#ControlType-enum">ControlType</a></span> QSizePolicy::<span class="name">controlType</span> () const</h3>
<p>Returns the control type associated with the widget for which this size policy applies.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also </b><a href="qsizepolicy.html#setControlType">setControlType</a>().</p>
<!-- @@@controlType -->
<!-- $$$expandingDirections[overload1]$$$expandingDirections -->
<h3 class="fn"><a name="expandingDirections"></a><span class="type"><a href="qt.html#Orientation-enum">Qt::Orientations</a></span> QSizePolicy::<span class="name">expandingDirections</span> () const</h3>
<p>Returns whether a widget can make use of more space than the <a href="qwidget.html#sizeHint-prop">QWidget::sizeHint</a>() function indicates.</p>
<p>A value of <a href="qt.html#Orientation-enum">Qt::Horizontal</a> or <a href="qt.html#Orientation-enum">Qt::Vertical</a> means that the widget can grow horizontally or vertically (i.e&#x2e;, the horizontal or vertical policy is <a href="qsizepolicy.html#Policy-enum">Expanding</a> or <a href="qsizepolicy.html#Policy-enum">MinimumExpanding</a>), whereas <a href="qt.html#Orientation-enum">Qt::Horizontal</a> | <a href="qt.html#Orientation-enum">Qt::Vertical</a> means that it can grow in both dimensions.</p>
<p><b>See also </b><a href="qsizepolicy.html#horizontalPolicy">horizontalPolicy</a>() and <a href="qsizepolicy.html#verticalPolicy">verticalPolicy</a>().</p>
<!-- @@@expandingDirections -->
<!-- $$$hasHeightForWidth[overload1]$$$hasHeightForWidth -->
<h3 class="fn"><a name="hasHeightForWidth"></a><span class="type">bool</span> QSizePolicy::<span class="name">hasHeightForWidth</span> () const</h3>
<p>Returns true if the widget's preferred height depends on its width; otherwise returns false.</p>
<p><b>See also </b><a href="qsizepolicy.html#setHeightForWidth">setHeightForWidth</a>().</p>
<!-- @@@hasHeightForWidth -->
<!-- $$$hasWidthForHeight[overload1]$$$hasWidthForHeight -->
<h3 class="fn"><a name="hasWidthForHeight"></a><span class="type">bool</span> QSizePolicy::<span class="name">hasWidthForHeight</span> () const</h3>
<p>Returns true if the widget's width depends on its height; otherwise returns false.</p>
<p>This function was introduced in Qt 4.8.</p>
<p><b>See also </b><a href="qsizepolicy.html#setWidthForHeight">setWidthForHeight</a>().</p>
<!-- @@@hasWidthForHeight -->
<!-- $$$horizontalPolicy[overload1]$$$horizontalPolicy -->
<h3 class="fn"><a name="horizontalPolicy"></a><span class="type"><a href="qsizepolicy.html#Policy-enum">Policy</a></span> QSizePolicy::<span class="name">horizontalPolicy</span> () const</h3>
<p>Returns the horizontal component of the size policy.</p>
<p><b>See also </b><a href="qsizepolicy.html#setHorizontalPolicy">setHorizontalPolicy</a>(), <a href="qsizepolicy.html#verticalPolicy">verticalPolicy</a>(), and <a href="qsizepolicy.html#horizontalStretch">horizontalStretch</a>().</p>
<!-- @@@horizontalPolicy -->
<!-- $$$horizontalStretch[overload1]$$$horizontalStretch -->
<h3 class="fn"><a name="horizontalStretch"></a><span class="type">int</span> QSizePolicy::<span class="name">horizontalStretch</span> () const</h3>
<p>Returns the horizontal stretch factor of the size policy.</p>
<p><b>See also </b><a href="qsizepolicy.html#setHorizontalStretch">setHorizontalStretch</a>(), <a href="qsizepolicy.html#verticalStretch">verticalStretch</a>(), and <a href="qsizepolicy.html#horizontalPolicy">horizontalPolicy</a>().</p>
<!-- @@@horizontalStretch -->
<!-- $$$setControlType[overload1]$$$setControlTypeControlType -->
<h3 class="fn"><a name="setControlType"></a><span class="type">void</span> QSizePolicy::<span class="name">setControlType</span> ( <span class="type"><a href="qsizepolicy.html#ControlType-enum">ControlType</a></span> <i>type</i> )</h3>
<p>Sets the control type associated with the widget for which this size policy applies to <i>type</i>.</p>
<p>The control type specifies the type of the widget for which this size policy applies. It is used by some styles, notably <a href="qmacstyle.html">QMacStyle</a>, to insert proper spacing between widgets. For example, the Mac OS X Aqua guidelines specify that push buttons should be separated by 12 pixels, whereas vertically stacked radio buttons only require 6 pixels.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also </b><a href="qsizepolicy.html#controlType">controlType</a>() and <a href="qstyle.html#layoutSpacing">QStyle::layoutSpacing</a>().</p>
<!-- @@@setControlType -->
<!-- $$$setHeightForWidth[overload1]$$$setHeightForWidthbool -->
<h3 class="fn"><a name="setHeightForWidth"></a><span class="type">void</span> QSizePolicy::<span class="name">setHeightForWidth</span> ( <span class="type">bool</span> <i>dependent</i> )</h3>
<p>Sets the flag determining whether the widget's preferred height depends on its width, to <i>dependent</i>.</p>
<p><b>See also </b><a href="qsizepolicy.html#hasHeightForWidth">hasHeightForWidth</a>() and <a href="qsizepolicy.html#setWidthForHeight">setWidthForHeight</a>().</p>
<!-- @@@setHeightForWidth -->
<!-- $$$setHorizontalPolicy[overload1]$$$setHorizontalPolicyPolicy -->
<h3 class="fn"><a name="setHorizontalPolicy"></a><span class="type">void</span> QSizePolicy::<span class="name">setHorizontalPolicy</span> ( <span class="type"><a href="qsizepolicy.html#Policy-enum">Policy</a></span> <i>policy</i> )</h3>
<p>Sets the horizontal component to the given <i>policy</i>.</p>
<p><b>See also </b><a href="qsizepolicy.html#horizontalPolicy">horizontalPolicy</a>(), <a href="qsizepolicy.html#setVerticalPolicy">setVerticalPolicy</a>(), and <a href="qsizepolicy.html#setHorizontalStretch">setHorizontalStretch</a>().</p>
<!-- @@@setHorizontalPolicy -->
<!-- $$$setHorizontalStretch[overload1]$$$setHorizontalStretchuchar -->
<h3 class="fn"><a name="setHorizontalStretch"></a><span class="type">void</span> QSizePolicy::<span class="name">setHorizontalStretch</span> ( <span class="type"><a href="qtglobal.html#uchar-typedef">uchar</a></span> <i>stretchFactor</i> )</h3>
<p>Sets the horizontal stretch factor of the size policy to the given <i>stretchFactor</i>.</p>
<p><b>See also </b><a href="qsizepolicy.html#horizontalStretch">horizontalStretch</a>(), <a href="qsizepolicy.html#setVerticalStretch">setVerticalStretch</a>(), and <a href="qsizepolicy.html#setHorizontalPolicy">setHorizontalPolicy</a>().</p>
<!-- @@@setHorizontalStretch -->
<!-- $$$setVerticalPolicy[overload1]$$$setVerticalPolicyPolicy -->
<h3 class="fn"><a name="setVerticalPolicy"></a><span class="type">void</span> QSizePolicy::<span class="name">setVerticalPolicy</span> ( <span class="type"><a href="qsizepolicy.html#Policy-enum">Policy</a></span> <i>policy</i> )</h3>
<p>Sets the vertical component to the given <i>policy</i>.</p>
<p><b>See also </b><a href="qsizepolicy.html#verticalPolicy">verticalPolicy</a>(), <a href="qsizepolicy.html#setHorizontalPolicy">setHorizontalPolicy</a>(), and <a href="qsizepolicy.html#setVerticalStretch">setVerticalStretch</a>().</p>
<!-- @@@setVerticalPolicy -->
<!-- $$$setVerticalStretch[overload1]$$$setVerticalStretchuchar -->
<h3 class="fn"><a name="setVerticalStretch"></a><span class="type">void</span> QSizePolicy::<span class="name">setVerticalStretch</span> ( <span class="type"><a href="qtglobal.html#uchar-typedef">uchar</a></span> <i>stretchFactor</i> )</h3>
<p>Sets the vertical stretch factor of the size policy to the given <i>stretchFactor</i>.</p>
<p><b>See also </b><a href="qsizepolicy.html#verticalStretch">verticalStretch</a>(), <a href="qsizepolicy.html#setHorizontalStretch">setHorizontalStretch</a>(), and <a href="qsizepolicy.html#setVerticalPolicy">setVerticalPolicy</a>().</p>
<!-- @@@setVerticalStretch -->
<!-- $$$setWidthForHeight[overload1]$$$setWidthForHeightbool -->
<h3 class="fn"><a name="setWidthForHeight"></a><span class="type">void</span> QSizePolicy::<span class="name">setWidthForHeight</span> ( <span class="type">bool</span> <i>dependent</i> )</h3>
<p>Sets the flag determining whether the widget's width depends on its height, to <i>dependent</i>.</p>
<p>This is only supported for <a href="qgraphicslayout.html">QGraphicsLayout</a>'s subclasses. It is not possible to have a layout with both height-for-width and width-for-height constraints at the same time.</p>
<p>This function was introduced in Qt 4.8.</p>
<p><b>See also </b><a href="qsizepolicy.html#hasWidthForHeight">hasWidthForHeight</a>() and <a href="qsizepolicy.html#setHeightForWidth">setHeightForWidth</a>().</p>
<!-- @@@setWidthForHeight -->
<!-- $$$transpose[overload1]$$$transpose -->
<h3 class="fn"><a name="transpose"></a><span class="type">void</span> QSizePolicy::<span class="name">transpose</span> ()</h3>
<p>Swaps the horizontal and vertical policies and stretches.</p>
<!-- @@@transpose -->
<!-- $$$verticalPolicy[overload1]$$$verticalPolicy -->
<h3 class="fn"><a name="verticalPolicy"></a><span class="type"><a href="qsizepolicy.html#Policy-enum">Policy</a></span> QSizePolicy::<span class="name">verticalPolicy</span> () const</h3>
<p>Returns the vertical component of the size policy.</p>
<p><b>See also </b><a href="qsizepolicy.html#setVerticalPolicy">setVerticalPolicy</a>(), <a href="qsizepolicy.html#horizontalPolicy">horizontalPolicy</a>(), and <a href="qsizepolicy.html#verticalStretch">verticalStretch</a>().</p>
<!-- @@@verticalPolicy -->
<!-- $$$verticalStretch[overload1]$$$verticalStretch -->
<h3 class="fn"><a name="verticalStretch"></a><span class="type">int</span> QSizePolicy::<span class="name">verticalStretch</span> () const</h3>
<p>Returns the vertical stretch factor of the size policy.</p>
<p><b>See also </b><a href="qsizepolicy.html#setVerticalStretch">setVerticalStretch</a>(), <a href="qsizepolicy.html#horizontalStretch">horizontalStretch</a>(), and <a href="qsizepolicy.html#verticalPolicy">verticalPolicy</a>().</p>
<!-- @@@verticalStretch -->
<!-- $$$operator QVariant[overload1]$$$operator QVariant -->
<h3 class="fn"><a name="operator-QVariant"></a>QSizePolicy::<span class="name">operator QVariant</span> () const</h3>
<p>Returns a <a href="qvariant.html">QVariant</a> storing this <a href="qsizepolicy.html">QSizePolicy</a>.</p>
<!-- @@@operator QVariant -->
<!-- $$$operator!=[overload1]$$$operator!=constQSizePolicy& -->
<h3 class="fn"><a name="operator-not-eq"></a><span class="type">bool</span> QSizePolicy::<span class="name">operator!=</span> ( const <span class="type">QSizePolicy</span> &amp; <i>other</i> ) const</h3>
<p>Returns true if this policy is different from <i>other</i>; otherwise returns false.</p>
<p><b>See also </b><a href="qsizepolicy.html#operator-eq-eq">operator==</a>().</p>
<!-- @@@operator!= -->
<!-- $$$operator==[overload1]$$$operator==constQSizePolicy& -->
<h3 class="fn"><a name="operator-eq-eq"></a><span class="type">bool</span> QSizePolicy::<span class="name">operator==</span> ( const <span class="type">QSizePolicy</span> &amp; <i>other</i> ) const</h3>
<p>Returns true if this policy is equal to <i>other</i>; otherwise returns false.</p>
<p><b>See also </b><a href="qsizepolicy.html#operator-not-eq">operator!=</a>().</p>
<!-- @@@operator== -->
</div>
<div class="relnonmem">
<h2>Related Non-Members</h2>
<!-- $$$operator<<$$$operator<<QDataStream&constQSizePolicy& -->
<h3 class="fn"><a name="operator-lt-lt-133"></a><span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <span class="name">operator&lt;&lt;</span> ( <span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <i>stream</i>, const <span class="type">QSizePolicy</span> &amp; <i>policy</i> )</h3>
<p>Writes the size <i>policy</i> to the data stream <i>stream</i>.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="datastreamformat.html">Format of the QDataStream operators</a>.</p>
<!-- @@@operator<< -->
<!-- $$$operator>>$$$operator>>QDataStream&QSizePolicy& -->
<h3 class="fn"><a name="operator-gt-gt-69"></a><span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <span class="name">operator&gt;&gt;</span> ( <span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <i>stream</i>, <span class="type">QSizePolicy</span> &amp; <i>policy</i> )</h3>
<p>Reads the size <i>policy</i> from the data stream <i>stream</i>.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="datastreamformat.html">Format of the QDataStream operators</a>.</p>
<!-- @@@operator>> -->
</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>