Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 5409

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" />
<!-- qgraphicslayoutitem.cpp -->
  <title>Qt 4.8: QGraphicsLayoutItem 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>QGraphicsLayoutItem</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-functions">Public Functions</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#subclassing-qgraphicslayoutitem">Subclassing QGraphicsLayoutItem</a></li>
<li class="level2"><a href="#nesting-qgraphicslayoutitems">Nesting QGraphicsLayoutItems</a></li>
</ul>
</div>
<h1 class="title">QGraphicsLayoutItem Class Reference</h1>
<!-- $$$QGraphicsLayoutItem-brief -->
<p>The QGraphicsLayoutItem class can be inherited to allow your custom items to be managed by layouts. <a href="#details">More...</a></p>
<!-- @@@QGraphicsLayoutItem -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QGraphicsLayoutItem&gt;</span></pre><p><b>Inherited by: </b><a href="qgraphicslayout.html">QGraphicsLayout</a> and <a href="qgraphicswidget.html">QGraphicsWidget</a>.</p>
<p>This class was introduced in Qt 4.4.</p>
<ul>
<li><a href="qgraphicslayoutitem-members.html">List of all members, including inherited members</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="qgraphicslayoutitem.html#QGraphicsLayoutItem">QGraphicsLayoutItem</a></b> ( QGraphicsLayoutItem * <i>parent</i> = 0, bool <i>isLayout</i> = false )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#dtor.QGraphicsLayoutItem">~QGraphicsLayoutItem</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#contentsRect">contentsRect</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSizeF </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#effectiveSizeHint">effectiveSizeHint</a></b> ( Qt::SizeHint <i>which</i>, const QSizeF &amp; <i>constraint</i> = QSizeF() ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#geometry">geometry</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#getContentsMargins">getContentsMargins</a></b> ( qreal * <i>left</i>, qreal * <i>top</i>, qreal * <i>right</i>, qreal * <i>bottom</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QGraphicsItem * </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#graphicsItem">graphicsItem</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#isLayout">isLayout</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#maximumHeight">maximumHeight</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSizeF </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#maximumSize">maximumSize</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#maximumWidth">maximumWidth</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#minimumHeight">minimumHeight</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSizeF </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#minimumSize">minimumSize</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#minimumWidth">minimumWidth</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#ownedByLayout">ownedByLayout</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QGraphicsLayoutItem * </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#parentLayoutItem">parentLayoutItem</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#preferredHeight">preferredHeight</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSizeF </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#preferredSize">preferredSize</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#preferredWidth">preferredWidth</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#setGeometry">setGeometry</a></b> ( const QRectF &amp; <i>rect</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#setMaximumHeight">setMaximumHeight</a></b> ( qreal <i>height</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#setMaximumSize">setMaximumSize</a></b> ( const QSizeF &amp; <i>size</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#setMaximumSize-2">setMaximumSize</a></b> ( qreal <i>w</i>, qreal <i>h</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#setMaximumWidth">setMaximumWidth</a></b> ( qreal <i>width</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#setMinimumHeight">setMinimumHeight</a></b> ( qreal <i>height</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#setMinimumSize">setMinimumSize</a></b> ( const QSizeF &amp; <i>size</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#setMinimumSize-2">setMinimumSize</a></b> ( qreal <i>w</i>, qreal <i>h</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#setMinimumWidth">setMinimumWidth</a></b> ( qreal <i>width</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#setParentLayoutItem">setParentLayoutItem</a></b> ( QGraphicsLayoutItem * <i>parent</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#setPreferredHeight">setPreferredHeight</a></b> ( qreal <i>height</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#setPreferredSize">setPreferredSize</a></b> ( const QSizeF &amp; <i>size</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#setPreferredSize-2">setPreferredSize</a></b> ( qreal <i>w</i>, qreal <i>h</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#setPreferredWidth">setPreferredWidth</a></b> ( qreal <i>width</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#setSizePolicy">setSizePolicy</a></b> ( const QSizePolicy &amp; <i>policy</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#setSizePolicy-2">setSizePolicy</a></b> ( QSizePolicy::Policy <i>hPolicy</i>, QSizePolicy::Policy <i>vPolicy</i>, QSizePolicy::ControlType <i>controlType</i> = QSizePolicy::DefaultType )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSizePolicy </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#sizePolicy">sizePolicy</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#updateGeometry">updateGeometry</a></b> ()</td></tr>
</table>
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#setGraphicsItem">setGraphicsItem</a></b> ( QGraphicsItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#setOwnedByLayout">setOwnedByLayout</a></b> ( bool <i>ownership</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSizeF </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a></b> ( Qt::SizeHint <i>which</i>, const QSizeF &amp; <i>constraint</i> = QSizeF() ) const = 0</td></tr>
</table>
<a name="details"></a>
<!-- $$$QGraphicsLayoutItem-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QGraphicsLayoutItem class can be inherited to allow your custom items to be managed by layouts.</p>
<p>QGraphicsLayoutItem is an abstract class that defines a set of virtual functions describing sizes, size policies, and size hints for any object arranged by <a href="qgraphicslayout.html">QGraphicsLayout</a>. The API contains functions relevant for both the item itself and for the user of the item as most of QGraphicsLayoutItem's functions are also part of the subclass' public API.</p>
<p>In most cases, existing layout-aware classes such as <a href="qgraphicswidget.html">QGraphicsWidget</a> and <a href="qgraphicslayout.html">QGraphicsLayout</a> already provide the functionality you require. However, subclassing these classes will enable you to create both graphical elements that work well with layouts (<a href="qgraphicswidget.html">QGraphicsWidget</a>) or custom layouts (<a href="qgraphicslayout.html">QGraphicsLayout</a>).</p>
<a name="subclassing-qgraphicslayoutitem"></a>
<h3>Subclassing QGraphicsLayoutItem</h3>
<p>If you create a subclass of QGraphicsLayoutItem and reimplement its virtual functions, you will enable the layout to resize and position your item along with other QGraphicsLayoutItems including <a href="qgraphicswidget.html">QGraphicsWidget</a> and <a href="qgraphicslayout.html">QGraphicsLayout</a>.</p>
<p>You can start by reimplementing important functions: the protected <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>() function, as well as the public <a href="qgraphicslayoutitem.html#setGeometry">setGeometry</a>() function. If you want your items to be aware of immediate geometry changes, you can also reimplement <a href="qgraphicslayoutitem.html#updateGeometry">updateGeometry</a>().</p>
<p>The geometry, size hint, and size policy affect the item's size and position. Calling <a href="qgraphicslayoutitem.html#setGeometry">setGeometry</a>() will always resize and reposition the item immediately. Normally, this function is called by <a href="qgraphicslayout.html">QGraphicsLayout</a> after the layout has been activated, but it can also be called by the item's user at any time.</p>
<p>The <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>() function returns the item' minimum, preferred and maximum size hints. You can override these properties by calling <a href="qgraphicslayoutitem.html#setMinimumSize">setMinimumSize</a>(), <a href="qgraphicslayoutitem.html#setPreferredSize">setPreferredSize</a>() or <a href="qgraphicslayoutitem.html#setMaximumSize">setMaximumSize</a>(). You can also use functions such as <a href="qgraphicslayoutitem.html#setMinimumWidth">setMinimumWidth</a>() or <a href="qgraphicslayoutitem.html#setMaximumHeight">setMaximumHeight</a>() to set only the width or height component if desired.</p>
<p>The <a href="qgraphicslayoutitem.html#effectiveSizeHint">effectiveSizeHint</a>() function, on the other hand, returns a size hint for any given <a href="qt.html#SizeHint-enum">Qt::SizeHint</a>, and guarantees that the returned size is bound to the minimum and maximum sizes and size hints. You can set the item's vertical and horizontal size policy by calling <a href="qgraphicslayoutitem.html#setSizePolicy">setSizePolicy</a>(). The sizePolicy property is used by the layout system to describe how this item prefers to grow or shrink.</p>
<a name="nesting-qgraphicslayoutitems"></a>
<h3>Nesting QGraphicsLayoutItems</h3>
<p>QGraphicsLayoutItems can be nested within other QGraphicsLayoutItems, similar to layouts that can contain sublayouts. This is done either by passing a QGraphicsLayoutItem pointer to QGraphicsLayoutItem's protected constructor, or by calling <a href="qgraphicslayoutitem.html#setParentLayoutItem">setParentLayoutItem</a>(). The <a href="qgraphicslayoutitem.html#parentLayoutItem">parentLayoutItem</a>() function returns a pointer to the item's layoutItem parent. If the item's parent is 0 or if the parent does not inherit from <a href="qgraphicsitem.html">QGraphicsItem</a>, the <a href="qgraphicslayoutitem.html#parentLayoutItem">parentLayoutItem</a>() function then returns 0. <a href="qgraphicslayoutitem.html#isLayout">isLayout</a>() returns true if the QGraphicsLayoutItem subclass is itself a layout, or false otherwise.</p>
<p>Qt uses QGraphicsLayoutItem to provide layout functionality in the <a href="graphicsview.html">Graphics View Framework</a>, but in the future its use may spread throughout Qt itself.</p>
</div>
<p><b>See also </b><a href="qgraphicswidget.html">QGraphicsWidget</a>, <a href="qgraphicslayout.html">QGraphicsLayout</a>, <a href="qgraphicslinearlayout.html">QGraphicsLinearLayout</a>, and <a href="qgraphicsgridlayout.html">QGraphicsGridLayout</a>.</p>
<!-- @@@QGraphicsLayoutItem -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QGraphicsLayoutItem[overload1]$$$QGraphicsLayoutItemQGraphicsLayoutItem*bool -->
<h3 class="fn"><a name="QGraphicsLayoutItem"></a>QGraphicsLayoutItem::<span class="name">QGraphicsLayoutItem</span> ( <span class="type">QGraphicsLayoutItem</span> * <i>parent</i> = 0, <span class="type">bool</span> <i>isLayout</i> = false )</h3>
<p>Constructs the <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> object. <i>parent</i> becomes the object's parent. If <i>isLayout</i> is true the item is a layout, otherwise <i>isLayout</i> is false.</p>
<!-- @@@QGraphicsLayoutItem -->
<!-- $$$~QGraphicsLayoutItem[overload1]$$$~QGraphicsLayoutItem -->
<h3 class="fn"><a name="dtor.QGraphicsLayoutItem"></a>QGraphicsLayoutItem::<span class="name">~QGraphicsLayoutItem</span> ()<tt> [virtual]</tt></h3>
<p>Destroys the <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> object.</p>
<!-- @@@~QGraphicsLayoutItem -->
<!-- $$$contentsRect[overload1]$$$contentsRect -->
<h3 class="fn"><a name="contentsRect"></a><span class="type"><a href="qrectf.html">QRectF</a></span> QGraphicsLayoutItem::<span class="name">contentsRect</span> () const</h3>
<p>Returns the contents rect in local coordinates.</p>
<p>The contents rect defines the subrectangle used by an associated layout when arranging subitems. This function is a convenience function that adjusts the item's <a href="qgraphicslayoutitem.html#geometry">geometry</a>() by its contents margins. Note that <a href="qgraphicslayoutitem.html#getContentsMargins">getContentsMargins</a>() is a virtual function that you can reimplement to return the item's contents margins.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#getContentsMargins">getContentsMargins</a>() and <a href="qgraphicslayoutitem.html#geometry">geometry</a>().</p>
<!-- @@@contentsRect -->
<!-- $$$effectiveSizeHint[overload1]$$$effectiveSizeHintQt::SizeHintconstQSizeF& -->
<h3 class="fn"><a name="effectiveSizeHint"></a><span class="type"><a href="qsizef.html">QSizeF</a></span> QGraphicsLayoutItem::<span class="name">effectiveSizeHint</span> ( <span class="type"><a href="qt.html#SizeHint-enum">Qt::SizeHint</a></span> <i>which</i>, const <span class="type"><a href="qsizef.html">QSizeF</a></span> &amp; <i>constraint</i> = QSizeF() ) const</h3>
<p>Returns the effective size hint for this <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a>.</p>
<p><i>which</i> is the size hint in question. <i>constraint</i> is an optional argument that defines a special constrain when calculating the effective size hint. By default, <i>constraint</i> is <a href="qsizef.html">QSizeF</a>(-1, -1), which means there is no constraint to the size hint.</p>
<p>If you want to specify the widget's size hint for a given width or height, you can provide the fixed dimension in <i>constraint</i>. This is useful for widgets that can grow only either vertically or horizontally, and need to set either their width or their height to a special value.</p>
<p>For example, a text paragraph item fit into a column width of 200 may grow vertically. You can pass <a href="qsizef.html">QSizeF</a>(200, -1) as a constraint to get a suitable minimum, preferred and maximum height).</p>
<p>You can adjust the effective size hint by reimplementing <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>() in a <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> subclass, or by calling one of the following functions: <a href="qgraphicslayoutitem.html#setMinimumSize">setMinimumSize</a>(), setPreferredSize, or <a href="qgraphicslayoutitem.html#setMaximumSize">setMaximumSize</a>() (or a combination of both).</p>
<p>This function caches each of the size hints and guarantees that <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>() will be called only once for each value of <i>which</i> - unless <i>constraint</i> is not specified and <a href="qgraphicslayoutitem.html#updateGeometry">updateGeometry</a>() has been called.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>().</p>
<!-- @@@effectiveSizeHint -->
<!-- $$$geometry[overload1]$$$geometry -->
<h3 class="fn"><a name="geometry"></a><span class="type"><a href="qrectf.html">QRectF</a></span> QGraphicsLayoutItem::<span class="name">geometry</span> () const</h3>
<p>Returns the item's geometry (e.g&#x2e;, position and size) as a <a href="qrectf.html">QRectF</a>. This function is equivalent to <a href="qrectf.html">QRectF</a>(pos(), size()).</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#setGeometry">setGeometry</a>().</p>
<!-- @@@geometry -->
<!-- $$$getContentsMargins[overload1]$$$getContentsMarginsqreal*qreal*qreal*qreal* -->
<h3 class="fn"><a name="getContentsMargins"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">getContentsMargins</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> * <i>left</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> * <i>top</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> * <i>right</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> * <i>bottom</i> ) const<tt> [virtual]</tt></h3>
<p>This virtual function provides the <i>left</i>, <i>top</i>, <i>right</i> and <i>bottom</i> contents margins for this <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a>. The default implementation assumes all contents margins are 0. The parameters point to values stored in qreals. If any of the pointers is 0, that value will not be updated.</p>
<p><b>See also </b><a href="qgraphicswidget.html#setContentsMargins">QGraphicsWidget::setContentsMargins</a>().</p>
<!-- @@@getContentsMargins -->
<!-- $$$graphicsItem[overload1]$$$graphicsItem -->
<h3 class="fn"><a name="graphicsItem"></a><span class="type"><a href="qgraphicsitem.html">QGraphicsItem</a></span> * QGraphicsLayoutItem::<span class="name">graphicsItem</span> () const</h3>
<p>Returns the <a href="qgraphicsitem.html">QGraphicsItem</a> that this layout item represents. For <a href="qgraphicswidget.html">QGraphicsWidget</a> it will return itself. For custom items it can return an aggregated value.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#setGraphicsItem">setGraphicsItem</a>().</p>
<!-- @@@graphicsItem -->
<!-- $$$isLayout[overload1]$$$isLayout -->
<h3 class="fn"><a name="isLayout"></a><span class="type">bool</span> QGraphicsLayoutItem::<span class="name">isLayout</span> () const</h3>
<p>Returns true if this <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> is a layout (e.g&#x2e;, is inherited by an object that arranges other <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> objects); otherwise returns false.</p>
<p><b>See also </b><a href="qgraphicslayout.html">QGraphicsLayout</a>.</p>
<!-- @@@isLayout -->
<!-- $$$maximumHeight[overload1]$$$maximumHeight -->
<h3 class="fn"><a name="maximumHeight"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QGraphicsLayoutItem::<span class="name">maximumHeight</span> () const</h3>
<p>Returns the maximum height.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#setMaximumHeight">setMaximumHeight</a>(), <a href="qgraphicslayoutitem.html#setMaximumSize">setMaximumSize</a>(), and <a href="qgraphicslayoutitem.html#maximumSize">maximumSize</a>().</p>
<!-- @@@maximumHeight -->
<!-- $$$maximumSize[overload1]$$$maximumSize -->
<h3 class="fn"><a name="maximumSize"></a><span class="type"><a href="qsizef.html">QSizeF</a></span> QGraphicsLayoutItem::<span class="name">maximumSize</span> () const</h3>
<p>Returns the maximum size.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#setMaximumSize">setMaximumSize</a>(), <a href="qgraphicslayoutitem.html#minimumSize">minimumSize</a>(), <a href="qgraphicslayoutitem.html#preferredSize">preferredSize</a>(), <a href="qt.html#SizeHint-enum">Qt::MaximumSize</a>, and <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>().</p>
<!-- @@@maximumSize -->
<!-- $$$maximumWidth[overload1]$$$maximumWidth -->
<h3 class="fn"><a name="maximumWidth"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QGraphicsLayoutItem::<span class="name">maximumWidth</span> () const</h3>
<p>Returns the maximum width.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#setMaximumWidth">setMaximumWidth</a>(), <a href="qgraphicslayoutitem.html#setMaximumSize">setMaximumSize</a>(), and <a href="qgraphicslayoutitem.html#maximumSize">maximumSize</a>().</p>
<!-- @@@maximumWidth -->
<!-- $$$minimumHeight[overload1]$$$minimumHeight -->
<h3 class="fn"><a name="minimumHeight"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QGraphicsLayoutItem::<span class="name">minimumHeight</span> () const</h3>
<p>Returns the minimum height.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#setMinimumHeight">setMinimumHeight</a>(), <a href="qgraphicslayoutitem.html#setMinimumSize">setMinimumSize</a>(), and <a href="qgraphicslayoutitem.html#minimumSize">minimumSize</a>().</p>
<!-- @@@minimumHeight -->
<!-- $$$minimumSize[overload1]$$$minimumSize -->
<h3 class="fn"><a name="minimumSize"></a><span class="type"><a href="qsizef.html">QSizeF</a></span> QGraphicsLayoutItem::<span class="name">minimumSize</span> () const</h3>
<p>Returns the minimum size.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#setMinimumSize">setMinimumSize</a>(), <a href="qgraphicslayoutitem.html#preferredSize">preferredSize</a>(), <a href="qgraphicslayoutitem.html#maximumSize">maximumSize</a>(), <a href="qt.html#SizeHint-enum">Qt::MinimumSize</a>, and <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>().</p>
<!-- @@@minimumSize -->
<!-- $$$minimumWidth[overload1]$$$minimumWidth -->
<h3 class="fn"><a name="minimumWidth"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QGraphicsLayoutItem::<span class="name">minimumWidth</span> () const</h3>
<p>Returns the minimum width.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#setMinimumWidth">setMinimumWidth</a>(), <a href="qgraphicslayoutitem.html#setMinimumSize">setMinimumSize</a>(), and <a href="qgraphicslayoutitem.html#minimumSize">minimumSize</a>().</p>
<!-- @@@minimumWidth -->
<!-- $$$ownedByLayout[overload1]$$$ownedByLayout -->
<h3 class="fn"><a name="ownedByLayout"></a><span class="type">bool</span> QGraphicsLayoutItem::<span class="name">ownedByLayout</span> () const</h3>
<p>Returns whether a layout should delete this item in its destructor. If its true, then the layout will delete it. If its false, then it is assumed that another object has the ownership of it, and the layout won't delete this item.</p>
<p>If the item inherits both <a href="qgraphicsitem.html">QGraphicsItem</a> and <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> (such as <a href="qgraphicswidget.html">QGraphicsWidget</a> does) the item is really part of two ownership hierarchies. This property informs what the layout should do with its child items when it is destructed. In the case of <a href="qgraphicswidget.html">QGraphicsWidget</a>, it is preferred that when the layout is deleted it won't delete its children (since they are also part of the graphics item hierarchy).</p>
<p>By default this value is initialized to false in <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a>, but it is overridden by <a href="qgraphicslayout.html">QGraphicsLayout</a> to return true. This is because <a href="qgraphicslayout.html">QGraphicsLayout</a> is not normally part of the <a href="qgraphicsitem.html">QGraphicsItem</a> hierarchy, so the parent layout should delete it. Subclasses might override this default behaviour by calling setOwnedByLayout(true).</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#setOwnedByLayout">setOwnedByLayout</a>().</p>
<!-- @@@ownedByLayout -->
<!-- $$$parentLayoutItem[overload1]$$$parentLayoutItem -->
<h3 class="fn"><a name="parentLayoutItem"></a><span class="type">QGraphicsLayoutItem</span> * QGraphicsLayoutItem::<span class="name">parentLayoutItem</span> () const</h3>
<p>Returns the parent of this <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a>, or 0 if there is no parent, or if the parent does not inherit from <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> (<a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> is often used through multiple inheritance with <a href="qobject.html">QObject</a>-derived classes).</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#setParentLayoutItem">setParentLayoutItem</a>().</p>
<!-- @@@parentLayoutItem -->
<!-- $$$preferredHeight[overload1]$$$preferredHeight -->
<h3 class="fn"><a name="preferredHeight"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QGraphicsLayoutItem::<span class="name">preferredHeight</span> () const</h3>
<p>Returns the preferred height.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#setPreferredHeight">setPreferredHeight</a>(), <a href="qgraphicslayoutitem.html#setPreferredSize">setPreferredSize</a>(), and <a href="qgraphicslayoutitem.html#preferredSize">preferredSize</a>().</p>
<!-- @@@preferredHeight -->
<!-- $$$preferredSize[overload1]$$$preferredSize -->
<h3 class="fn"><a name="preferredSize"></a><span class="type"><a href="qsizef.html">QSizeF</a></span> QGraphicsLayoutItem::<span class="name">preferredSize</span> () const</h3>
<p>Returns the preferred size.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#setPreferredSize">setPreferredSize</a>(), <a href="qgraphicslayoutitem.html#minimumSize">minimumSize</a>(), <a href="qgraphicslayoutitem.html#maximumSize">maximumSize</a>(), <a href="qt.html#SizeHint-enum">Qt::PreferredSize</a>, and <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>().</p>
<!-- @@@preferredSize -->
<!-- $$$preferredWidth[overload1]$$$preferredWidth -->
<h3 class="fn"><a name="preferredWidth"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QGraphicsLayoutItem::<span class="name">preferredWidth</span> () const</h3>
<p>Returns the preferred width.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#setPreferredWidth">setPreferredWidth</a>(), <a href="qgraphicslayoutitem.html#setPreferredSize">setPreferredSize</a>(), and <a href="qgraphicslayoutitem.html#preferredSize">preferredSize</a>().</p>
<!-- @@@preferredWidth -->
<!-- $$$setGeometry[overload1]$$$setGeometryconstQRectF& -->
<h3 class="fn"><a name="setGeometry"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setGeometry</span> ( const <span class="type"><a href="qrectf.html">QRectF</a></span> &amp; <i>rect</i> )<tt> [virtual]</tt></h3>
<p>This virtual function sets the geometry of the <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> to <i>rect</i>, which is in parent coordinates (e.g&#x2e;, the top-left corner of <i>rect</i> is equivalent to the item's position in parent coordinates).</p>
<p>You must reimplement this function in a subclass of <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> to receive geometry updates. The layout will call this function when it does a rearrangement.</p>
<p>If <i>rect</i> is outside of the bounds of minimumSize and maximumSize, it will be adjusted to its closest size so that it is within the legal bounds.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#geometry">geometry</a>().</p>
<!-- @@@setGeometry -->
<!-- $$$setGraphicsItem[overload1]$$$setGraphicsItemQGraphicsItem* -->
<h3 class="fn"><a name="setGraphicsItem"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setGraphicsItem</span> ( <span class="type"><a href="qgraphicsitem.html">QGraphicsItem</a></span> * <i>item</i> )<tt> [protected]</tt></h3>
<p>If the <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> represents a <a href="qgraphicsitem.html">QGraphicsItem</a>, and it wants to take advantage of the automatic reparenting capabilities of <a href="qgraphicslayout.html">QGraphicsLayout</a> it should set this value. Note that if you delete <i>item</i> and not delete the layout item, you are responsible of calling setGraphicsItem(0) in order to avoid having a dangling pointer.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#graphicsItem">graphicsItem</a>().</p>
<!-- @@@setGraphicsItem -->
<!-- $$$setMaximumHeight[overload1]$$$setMaximumHeightqreal -->
<h3 class="fn"><a name="setMaximumHeight"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setMaximumHeight</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>height</i> )</h3>
<p>Sets the maximum height to <i>height</i>.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#maximumHeight">maximumHeight</a>(), <a href="qgraphicslayoutitem.html#setMaximumSize">setMaximumSize</a>(), and <a href="qgraphicslayoutitem.html#maximumSize">maximumSize</a>().</p>
<!-- @@@setMaximumHeight -->
<!-- $$$setMaximumSize[overload1]$$$setMaximumSizeconstQSizeF& -->
<h3 class="fn"><a name="setMaximumSize"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setMaximumSize</span> ( const <span class="type"><a href="qsizef.html">QSizeF</a></span> &amp; <i>size</i> )</h3>
<p>Sets the maximum size to <i>size</i>. This property overrides <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>() for <a href="qt.html#SizeHint-enum">Qt::MaximumSize</a> and ensures that <a href="qgraphicslayoutitem.html#effectiveSizeHint">effectiveSizeHint</a>() will never return a size larger than <i>size</i>. In order to unset the maximum size, use an invalid size.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#maximumSize">maximumSize</a>(), <a href="qgraphicslayoutitem.html#minimumSize">minimumSize</a>(), <a href="qgraphicslayoutitem.html#preferredSize">preferredSize</a>(), <a href="qt.html#SizeHint-enum">Qt::MaximumSize</a>, and <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>().</p>
<!-- @@@setMaximumSize -->
<!-- $$$setMaximumSize$$$setMaximumSizeqrealqreal -->
<h3 class="fn"><a name="setMaximumSize-2"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setMaximumSize</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>w</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>h</i> )</h3>
<p>This convenience function is equivalent to calling setMaximumSize(<a href="qsizef.html">QSizeF</a>(<i>w</i>, <i>h</i>)).</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#maximumSize">maximumSize</a>(), <a href="qgraphicslayoutitem.html#setMinimumSize">setMinimumSize</a>(), <a href="qgraphicslayoutitem.html#setPreferredSize">setPreferredSize</a>(), and <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>().</p>
<!-- @@@setMaximumSize -->
<!-- $$$setMaximumWidth[overload1]$$$setMaximumWidthqreal -->
<h3 class="fn"><a name="setMaximumWidth"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setMaximumWidth</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>width</i> )</h3>
<p>Sets the maximum width to <i>width</i>.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#maximumWidth">maximumWidth</a>(), <a href="qgraphicslayoutitem.html#setMaximumSize">setMaximumSize</a>(), and <a href="qgraphicslayoutitem.html#maximumSize">maximumSize</a>().</p>
<!-- @@@setMaximumWidth -->
<!-- $$$setMinimumHeight[overload1]$$$setMinimumHeightqreal -->
<h3 class="fn"><a name="setMinimumHeight"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setMinimumHeight</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>height</i> )</h3>
<p>Sets the minimum height to <i>height</i>.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#minimumHeight">minimumHeight</a>(), <a href="qgraphicslayoutitem.html#setMinimumSize">setMinimumSize</a>(), and <a href="qgraphicslayoutitem.html#minimumSize">minimumSize</a>().</p>
<!-- @@@setMinimumHeight -->
<!-- $$$setMinimumSize[overload1]$$$setMinimumSizeconstQSizeF& -->
<h3 class="fn"><a name="setMinimumSize"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setMinimumSize</span> ( const <span class="type"><a href="qsizef.html">QSizeF</a></span> &amp; <i>size</i> )</h3>
<p>Sets the minimum size to <i>size</i>. This property overrides <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>() for <a href="qt.html#SizeHint-enum">Qt::MinimumSize</a> and ensures that <a href="qgraphicslayoutitem.html#effectiveSizeHint">effectiveSizeHint</a>() will never return a size smaller than <i>size</i>. In order to unset the minimum size, use an invalid size.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#minimumSize">minimumSize</a>(), <a href="qgraphicslayoutitem.html#maximumSize">maximumSize</a>(), <a href="qgraphicslayoutitem.html#preferredSize">preferredSize</a>(), <a href="qt.html#SizeHint-enum">Qt::MinimumSize</a>, <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>(), <a href="qgraphicslayoutitem.html#setMinimumWidth">setMinimumWidth</a>(), and <a href="qgraphicslayoutitem.html#setMinimumHeight">setMinimumHeight</a>().</p>
<!-- @@@setMinimumSize -->
<!-- $$$setMinimumSize$$$setMinimumSizeqrealqreal -->
<h3 class="fn"><a name="setMinimumSize-2"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setMinimumSize</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>w</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>h</i> )</h3>
<p>This convenience function is equivalent to calling setMinimumSize(<a href="qsizef.html">QSizeF</a>(<i>w</i>, <i>h</i>)).</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#minimumSize">minimumSize</a>(), <a href="qgraphicslayoutitem.html#setMaximumSize">setMaximumSize</a>(), <a href="qgraphicslayoutitem.html#setPreferredSize">setPreferredSize</a>(), and <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>().</p>
<!-- @@@setMinimumSize -->
<!-- $$$setMinimumWidth[overload1]$$$setMinimumWidthqreal -->
<h3 class="fn"><a name="setMinimumWidth"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setMinimumWidth</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>width</i> )</h3>
<p>Sets the minimum width to <i>width</i>.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#minimumWidth">minimumWidth</a>(), <a href="qgraphicslayoutitem.html#setMinimumSize">setMinimumSize</a>(), and <a href="qgraphicslayoutitem.html#minimumSize">minimumSize</a>().</p>
<!-- @@@setMinimumWidth -->
<!-- $$$setOwnedByLayout[overload1]$$$setOwnedByLayoutbool -->
<h3 class="fn"><a name="setOwnedByLayout"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setOwnedByLayout</span> ( <span class="type">bool</span> <i>ownership</i> )<tt> [protected]</tt></h3>
<p>Sets whether a layout should delete this item in its destructor or not. <i>ownership</i> must be true to in order for the layout to delete it.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#ownedByLayout">ownedByLayout</a>().</p>
<!-- @@@setOwnedByLayout -->
<!-- $$$setParentLayoutItem[overload1]$$$setParentLayoutItemQGraphicsLayoutItem* -->
<h3 class="fn"><a name="setParentLayoutItem"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setParentLayoutItem</span> ( <span class="type">QGraphicsLayoutItem</span> * <i>parent</i> )</h3>
<p>Sets the parent of this <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> to <i>parent</i>.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#parentLayoutItem">parentLayoutItem</a>().</p>
<!-- @@@setParentLayoutItem -->
<!-- $$$setPreferredHeight[overload1]$$$setPreferredHeightqreal -->
<h3 class="fn"><a name="setPreferredHeight"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setPreferredHeight</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>height</i> )</h3>
<p>Sets the preferred height to <i>height</i>.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#preferredHeight">preferredHeight</a>(), <a href="qgraphicslayoutitem.html#preferredWidth">preferredWidth</a>(), <a href="qgraphicslayoutitem.html#setPreferredSize">setPreferredSize</a>(), and <a href="qgraphicslayoutitem.html#preferredSize">preferredSize</a>().</p>
<!-- @@@setPreferredHeight -->
<!-- $$$setPreferredSize[overload1]$$$setPreferredSizeconstQSizeF& -->
<h3 class="fn"><a name="setPreferredSize"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setPreferredSize</span> ( const <span class="type"><a href="qsizef.html">QSizeF</a></span> &amp; <i>size</i> )</h3>
<p>Sets the preferred size to <i>size</i>. This property overrides <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>() for <a href="qt.html#SizeHint-enum">Qt::PreferredSize</a> and provides the default value for <a href="qgraphicslayoutitem.html#effectiveSizeHint">effectiveSizeHint</a>(). In order to unset the preferred size, use an invalid size.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#preferredSize">preferredSize</a>(), <a href="qgraphicslayoutitem.html#minimumSize">minimumSize</a>(), <a href="qgraphicslayoutitem.html#maximumSize">maximumSize</a>(), <a href="qt.html#SizeHint-enum">Qt::PreferredSize</a>, and <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>().</p>
<!-- @@@setPreferredSize -->
<!-- $$$setPreferredSize$$$setPreferredSizeqrealqreal -->
<h3 class="fn"><a name="setPreferredSize-2"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setPreferredSize</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>w</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>h</i> )</h3>
<p>This convenience function is equivalent to calling setPreferredSize(<a href="qsizef.html">QSizeF</a>(<i>w</i>, <i>h</i>)).</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#preferredSize">preferredSize</a>(), <a href="qgraphicslayoutitem.html#setMaximumSize">setMaximumSize</a>(), <a href="qgraphicslayoutitem.html#setMinimumSize">setMinimumSize</a>(), and <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>().</p>
<!-- @@@setPreferredSize -->
<!-- $$$setPreferredWidth[overload1]$$$setPreferredWidthqreal -->
<h3 class="fn"><a name="setPreferredWidth"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setPreferredWidth</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>width</i> )</h3>
<p>Sets the preferred width to <i>width</i>.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#preferredWidth">preferredWidth</a>(), <a href="qgraphicslayoutitem.html#preferredHeight">preferredHeight</a>(), <a href="qgraphicslayoutitem.html#setPreferredSize">setPreferredSize</a>(), and <a href="qgraphicslayoutitem.html#preferredSize">preferredSize</a>().</p>
<!-- @@@setPreferredWidth -->
<!-- $$$setSizePolicy[overload1]$$$setSizePolicyconstQSizePolicy& -->
<h3 class="fn"><a name="setSizePolicy"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setSizePolicy</span> ( const <span class="type"><a href="qsizepolicy.html">QSizePolicy</a></span> &amp; <i>policy</i> )</h3>
<p>Sets the size policy to <i>policy</i>. The size policy describes how the item should grow horizontally and vertically when arranged in a layout.</p>
<p><a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a>'s default size policy is (<a href="qsizepolicy.html#Policy-enum">QSizePolicy::Fixed</a>, <a href="qsizepolicy.html#Policy-enum">QSizePolicy::Fixed</a>, <a href="qsizepolicy.html#ControlType-enum">QSizePolicy::DefaultType</a>), but it is common for subclasses to change the default. For example, <a href="qgraphicswidget.html">QGraphicsWidget</a> defaults to (<a href="qsizepolicy.html#Policy-enum">QSizePolicy::Preferred</a>, <a href="qsizepolicy.html#Policy-enum">QSizePolicy::Preferred</a>, <a href="qsizepolicy.html#ControlType-enum">QSizePolicy::DefaultType</a>).</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#sizePolicy">sizePolicy</a>() and <a href="qwidget.html#sizePolicy-prop">QWidget::sizePolicy</a>().</p>
<!-- @@@setSizePolicy -->
<!-- $$$setSizePolicy$$$setSizePolicyQSizePolicy::PolicyQSizePolicy::PolicyQSizePolicy::ControlType -->
<h3 class="fn"><a name="setSizePolicy-2"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setSizePolicy</span> ( <span class="type"><a href="qsizepolicy.html#Policy-enum">QSizePolicy::Policy</a></span> <i>hPolicy</i>, <span class="type"><a href="qsizepolicy.html#Policy-enum">QSizePolicy::Policy</a></span> <i>vPolicy</i>, <span class="type"><a href="qsizepolicy.html#ControlType-enum">QSizePolicy::ControlType</a></span> <i>controlType</i> = QSizePolicy::DefaultType )</h3>
<p>This is an overloaded function.</p>
<p>This function is equivalent to calling setSizePolicy(<a href="qsizepolicy.html">QSizePolicy</a>(<i>hPolicy</i>, <i>vPolicy</i>, <i>controlType</i>)).</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#sizePolicy">sizePolicy</a>() and <a href="qwidget.html#sizePolicy-prop">QWidget::sizePolicy</a>().</p>
<!-- @@@setSizePolicy -->
<!-- $$$sizeHint[overload1]$$$sizeHintQt::SizeHintconstQSizeF& -->
<h3 class="fn"><a name="sizeHint"></a><span class="type"><a href="qsizef.html">QSizeF</a></span> QGraphicsLayoutItem::<span class="name">sizeHint</span> ( <span class="type"><a href="qt.html#SizeHint-enum">Qt::SizeHint</a></span> <i>which</i>, const <span class="type"><a href="qsizef.html">QSizeF</a></span> &amp; <i>constraint</i> = QSizeF() ) const<tt> [pure virtual protected]</tt></h3>
<p>This pure virtual function returns the size hint for <i>which</i> of the <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a>, using the width or height of <i>constraint</i> to constrain the output.</p>
<p>Reimplement this function in a subclass of <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> to provide the necessary size hints for your items.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#effectiveSizeHint">effectiveSizeHint</a>().</p>
<!-- @@@sizeHint -->
<!-- $$$sizePolicy[overload1]$$$sizePolicy -->
<h3 class="fn"><a name="sizePolicy"></a><span class="type"><a href="qsizepolicy.html">QSizePolicy</a></span> QGraphicsLayoutItem::<span class="name">sizePolicy</span> () const</h3>
<p>Returns the current size policy.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#setSizePolicy">setSizePolicy</a>() and <a href="qwidget.html#sizePolicy-prop">QWidget::sizePolicy</a>().</p>
<!-- @@@sizePolicy -->
<!-- $$$updateGeometry[overload1]$$$updateGeometry -->
<h3 class="fn"><a name="updateGeometry"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">updateGeometry</span> ()<tt> [virtual]</tt></h3>
<p>This virtual function discards any cached size hint information. You should always call this function if you change the return value of the <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>() function. Subclasses must always call the base implementation when reimplementing this function.</p>
<p><b>See also </b><a href="qgraphicslayoutitem.html#effectiveSizeHint">effectiveSizeHint</a>().</p>
<!-- @@@updateGeometry -->
</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>