Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates > by-pkgid > 768f7d9f703884aa2562bf0a651086df > files > 3330

qtbase5-doc-5.9.4-1.1.mga6.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qgraphicslayoutitem.cpp -->
  <title>QGraphicsLayoutItem Class | Qt Widgets 5.9</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.9</td><td ><a href="qtwidgets-index.html">Qt Widgets</a></td><td ><a href="qtwidgets-module.html">C++ Classes</a></td><td >QGraphicsLayoutItem</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<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>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QGraphicsLayoutItem Class</h1>
<!-- $$$QGraphicsLayoutItem-brief -->
<p>The <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> class can be inherited to allow your custom items to be managed by layouts. <a href="#details">More...</a></p>
<!-- @@@QGraphicsLayoutItem -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QGraphicsLayoutItem&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += widgets</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 4.4</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qgraphicslayout.html">QGraphicsLayout</a> and <a href="qgraphicswidget.html">QGraphicsWidget</a></p>
</td></tr></table></div><ul>
<li><a href="qgraphicslayoutitem-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><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> = Q_NULLPTR, 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-1">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-1">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-1">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-1">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></div>
<a name="protected-functions"></a>
<h2 id="protected-functions">Protected Functions</h2>
<div class="table"><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></div>
<a name="details"></a>
<!-- $$$QGraphicsLayoutItem-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> class can be inherited to allow your custom items to be managed by layouts.</p>
<p><a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> 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="graphicsview.html#qgraphicslayout">QGraphicsLayout</a>. The API contains functions relevant for both the item itself and for the user of the item as most of <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a>'s functions are also part of the subclass' public API.</p>
<p>In most cases, existing layout-aware classes such as <a href="graphicsview.html#qgraphicswidget">QGraphicsWidget</a> and <a href="graphicsview.html#qgraphicslayout">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="graphicsview.html#qgraphicswidget">QGraphicsWidget</a>) or custom layouts (<a href="graphicsview.html#qgraphicslayout">QGraphicsLayout</a>).</p>
<a name="subclassing-qgraphicslayoutitem"></a>
<h3 >Subclassing QGraphicsLayoutItem</h3>
<p>If you create a subclass of <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> and reimplement its virtual functions, you will enable the layout to resize and position your item along with other QGraphicsLayoutItems including <a href="graphicsview.html#qgraphicswidget">QGraphicsWidget</a> and <a href="graphicsview.html#qgraphicslayout">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="graphicsview.html#qgraphicslayout">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="../qtcore/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 <a href="qgraphicslayoutitem.html#sizePolicy">sizePolicy</a> 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 <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> pointer to <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a>'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 <code>true</code> if the <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> subclass is itself a layout, or false otherwise.</p>
<p>Qt uses <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> 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="graphicsview.html#qgraphicswidget">QGraphicsWidget</a>, <a href="graphicsview.html#qgraphicslayout">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" id="QGraphicsLayoutItem"><a name="QGraphicsLayoutItem"></a>QGraphicsLayoutItem::<span class="name">QGraphicsLayoutItem</span>(<span class="type"><a href="qgraphicslayoutitem.html#QGraphicsLayoutItem">QGraphicsLayoutItem</a></span> *<i>parent</i> = Q_NULLPTR, <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" id="dtor.QGraphicsLayoutItem"><a name="dtor.QGraphicsLayoutItem"></a><code>[virtual] </code>QGraphicsLayoutItem::<span class="name">~QGraphicsLayoutItem</span>()</h3>
<p>Destroys the <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a> object.</p>
<!-- @@@~QGraphicsLayoutItem -->
<!-- $$$contentsRect[overload1]$$$contentsRect -->
<h3 class="fn" id="contentsRect"><a name="contentsRect"></a><span class="type"><a href="../qtcore/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" id="effectiveSizeHint"><a name="effectiveSizeHint"></a><span class="type"><a href="../qtcore/qsizef.html">QSizeF</a></span> QGraphicsLayoutItem::<span class="name">effectiveSizeHint</span>(<span class="type"><a href="../qtcore/qt.html#SizeHint-enum">Qt::SizeHint</a></span> <i>which</i>, const <span class="type"><a href="../qtcore/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="../qtcore/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="../qtcore/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>(), <a href="qgraphicslayoutitem.html#setPreferredSize">setPreferredSize</a>, 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" id="geometry"><a name="geometry"></a><span class="type"><a href="../qtcore/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="../qtcore/qrectf.html">QRectF</a>. This function is equivalent to <a href="../qtcore/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" id="getContentsMargins"><a name="getContentsMargins"></a><code>[virtual] </code><span class="type">void</span> QGraphicsLayoutItem::<span class="name">getContentsMargins</span>(<span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> *<i>left</i>, <span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> *<i>top</i>, <span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> *<i>right</i>, <span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> *<i>bottom</i>) const</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" id="graphicsItem"><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="graphicsview.html#qgraphicswidget">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" id="isLayout"><a name="isLayout"></a><span class="type">bool</span> QGraphicsLayoutItem::<span class="name">isLayout</span>() const</h3>
<p>Returns <code>true</code> 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 <code>false</code>.</p>
<p><b>See also </b><a href="graphicsview.html#qgraphicslayout">QGraphicsLayout</a>.</p>
<!-- @@@isLayout -->
<!-- $$$maximumHeight[overload1]$$$maximumHeight -->
<h3 class="fn" id="maximumHeight"><a name="maximumHeight"></a><span class="type"><a href="../qtcore/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" id="maximumSize"><a name="maximumSize"></a><span class="type"><a href="../qtcore/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="../qtcore/qt.html#SizeHint-enum">Qt::MaximumSize</a>, and <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>().</p>
<!-- @@@maximumSize -->
<!-- $$$maximumWidth[overload1]$$$maximumWidth -->
<h3 class="fn" id="maximumWidth"><a name="maximumWidth"></a><span class="type"><a href="../qtcore/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" id="minimumHeight"><a name="minimumHeight"></a><span class="type"><a href="../qtcore/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" id="minimumSize"><a name="minimumSize"></a><span class="type"><a href="../qtcore/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="../qtcore/qt.html#SizeHint-enum">Qt::MinimumSize</a>, and <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>().</p>
<!-- @@@minimumSize -->
<!-- $$$minimumWidth[overload1]$$$minimumWidth -->
<h3 class="fn" id="minimumWidth"><a name="minimumWidth"></a><span class="type"><a href="../qtcore/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" id="ownedByLayout"><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="graphicsview.html#qgraphicswidget">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="graphicsview.html#qgraphicswidget">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="graphicsview.html#qgraphicslayout">QGraphicsLayout</a> to return true. This is because <a href="graphicsview.html#qgraphicslayout">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 <a href="qgraphicslayoutitem.html#setOwnedByLayout">setOwnedByLayout</a>(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" id="parentLayoutItem"><a name="parentLayoutItem"></a><span class="type"><a href="qgraphicslayoutitem.html#QGraphicsLayoutItem">QGraphicsLayoutItem</a></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="../qtcore/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" id="preferredHeight"><a name="preferredHeight"></a><span class="type"><a href="../qtcore/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" id="preferredSize"><a name="preferredSize"></a><span class="type"><a href="../qtcore/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="../qtcore/qt.html#SizeHint-enum">Qt::PreferredSize</a>, and <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>().</p>
<!-- @@@preferredSize -->
<!-- $$$preferredWidth[overload1]$$$preferredWidth -->
<h3 class="fn" id="preferredWidth"><a name="preferredWidth"></a><span class="type"><a href="../qtcore/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" id="setGeometry"><a name="setGeometry"></a><code>[virtual] </code><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setGeometry</span>(const <span class="type"><a href="../qtcore/qrectf.html">QRectF</a></span> &amp;<i>rect</i>)</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 <a href="qgraphicslayoutitem.html#minimumSize">minimumSize</a> and <a href="qgraphicslayoutitem.html#maximumSize">maximumSize</a>, 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" id="setGraphicsItem"><a name="setGraphicsItem"></a><code>[protected] </code><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setGraphicsItem</span>(<span class="type"><a href="qgraphicsitem.html">QGraphicsItem</a></span> *<i>item</i>)</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="graphicsview.html#qgraphicslayout">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" id="setMaximumHeight"><a name="setMaximumHeight"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setMaximumHeight</span>(<span class="type"><a href="../qtcore/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" id="setMaximumSize"><a name="setMaximumSize"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setMaximumSize</span>(const <span class="type"><a href="../qtcore/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="../qtcore/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="../qtcore/qt.html#SizeHint-enum">Qt::MaximumSize</a>, and <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>().</p>
<!-- @@@setMaximumSize -->
<!-- $$$setMaximumSize$$$setMaximumSizeqrealqreal -->
<h3 class="fn" id="setMaximumSize-1"><a name="setMaximumSize-1"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setMaximumSize</span>(<span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>w</i>, <span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>h</i>)</h3>
<p>This convenience function is equivalent to calling <a href="qgraphicslayoutitem.html#setMaximumSize">setMaximumSize</a>(<a href="../qtcore/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" id="setMaximumWidth"><a name="setMaximumWidth"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setMaximumWidth</span>(<span class="type"><a href="../qtcore/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" id="setMinimumHeight"><a name="setMinimumHeight"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setMinimumHeight</span>(<span class="type"><a href="../qtcore/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" id="setMinimumSize"><a name="setMinimumSize"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setMinimumSize</span>(const <span class="type"><a href="../qtcore/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="../qtcore/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="../qtcore/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" id="setMinimumSize-1"><a name="setMinimumSize-1"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setMinimumSize</span>(<span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>w</i>, <span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>h</i>)</h3>
<p>This convenience function is equivalent to calling <a href="qgraphicslayoutitem.html#setMinimumSize">setMinimumSize</a>(<a href="../qtcore/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" id="setMinimumWidth"><a name="setMinimumWidth"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setMinimumWidth</span>(<span class="type"><a href="../qtcore/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" id="setOwnedByLayout"><a name="setOwnedByLayout"></a><code>[protected] </code><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setOwnedByLayout</span>(<span class="type">bool</span> <i>ownership</i>)</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" id="setParentLayoutItem"><a name="setParentLayoutItem"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setParentLayoutItem</span>(<span class="type"><a href="qgraphicslayoutitem.html#QGraphicsLayoutItem">QGraphicsLayoutItem</a></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" id="setPreferredHeight"><a name="setPreferredHeight"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setPreferredHeight</span>(<span class="type"><a href="../qtcore/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" id="setPreferredSize"><a name="setPreferredSize"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setPreferredSize</span>(const <span class="type"><a href="../qtcore/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="../qtcore/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="../qtcore/qt.html#SizeHint-enum">Qt::PreferredSize</a>, and <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>().</p>
<!-- @@@setPreferredSize -->
<!-- $$$setPreferredSize$$$setPreferredSizeqrealqreal -->
<h3 class="fn" id="setPreferredSize-1"><a name="setPreferredSize-1"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setPreferredSize</span>(<span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>w</i>, <span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>h</i>)</h3>
<p>This convenience function is equivalent to calling <a href="qgraphicslayoutitem.html#setPreferredSize">setPreferredSize</a>(<a href="../qtcore/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" id="setPreferredWidth"><a name="setPreferredWidth"></a><span class="type">void</span> QGraphicsLayoutItem::<span class="name">setPreferredWidth</span>(<span class="type"><a href="../qtcore/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" id="setSizePolicy"><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="graphicsview.html#qgraphicswidget">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" id="setSizePolicy-1"><a name="setSizePolicy-1"></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 <a href="qgraphicslayoutitem.html#setSizePolicy">setSizePolicy</a>(<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" id="sizeHint"><a name="sizeHint"></a><code>[pure virtual protected] </code><span class="type"><a href="../qtcore/qsizef.html">QSizeF</a></span> QGraphicsLayoutItem::<span class="name">sizeHint</span>(<span class="type"><a href="../qtcore/qt.html#SizeHint-enum">Qt::SizeHint</a></span> <i>which</i>, const <span class="type"><a href="../qtcore/qsizef.html">QSizeF</a></span> &amp;<i>constraint</i> = QSizeF()) const</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" id="sizePolicy"><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" id="updateGeometry"><a name="updateGeometry"></a><code>[virtual] </code><span class="type">void</span> QGraphicsLayoutItem::<span class="name">updateGeometry</span>()</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>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    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.<br>    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. </p>
</div>
</body>
</html>