Sophie

Sophie

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

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" />
<!-- qgraphicslinearlayout.cpp -->
  <title>QGraphicsLinearLayout 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 >QGraphicsLinearLayout</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="#reimplemented-public-functions">Reimplemented Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#size-hints-and-size-policies-in-qgraphicslinearlayout">Size Hints and Size Policies in QGraphicsLinearLayout</a></li>
<li class="level2"><a href="#spacing-within-qgraphicslinearlayout">Spacing within QGraphicsLinearLayout</a></li>
<li class="level2"><a href="#stretch-factor-in-qgraphicslinearlayout">Stretch Factor in QGraphicsLinearLayout</a></li>
<li class="level2"><a href="#qgraphicslinearlayout-compared-to-other-layouts">QGraphicsLinearLayout Compared to Other Layouts</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QGraphicsLinearLayout Class</h1>
<!-- $$$QGraphicsLinearLayout-brief -->
<p>The <a href="qgraphicslinearlayout.html">QGraphicsLinearLayout</a> class provides a horizontal or vertical layout for managing widgets in Graphics View. <a href="#details">More...</a></p>
<!-- @@@QGraphicsLinearLayout -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QGraphicsLinearLayout&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"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qgraphicslayout.html">QGraphicsLayout</a></td></tr></table></div><ul>
<li><a href="qgraphicslinearlayout-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="qgraphicslinearlayout.html#QGraphicsLinearLayout">QGraphicsLinearLayout</a></b>(QGraphicsLayoutItem *<i>parent</i> = Q_NULLPTR)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#QGraphicsLinearLayout-1">QGraphicsLinearLayout</a></b>(Qt::Orientation <i>orientation</i>, QGraphicsLayoutItem *<i>parent</i> = Q_NULLPTR)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#dtor.QGraphicsLinearLayout">~QGraphicsLinearLayout</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#addItem">addItem</a></b>(QGraphicsLayoutItem *<i>item</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#addStretch">addStretch</a></b>(int <i>stretch</i> = 1)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::Alignment </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#alignment">alignment</a></b>(QGraphicsLayoutItem *<i>item</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#insertItem">insertItem</a></b>(int <i>index</i>, QGraphicsLayoutItem *<i>item</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#insertStretch">insertStretch</a></b>(int <i>index</i>, int <i>stretch</i> = 1)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#itemSpacing">itemSpacing</a></b>(int <i>index</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::Orientation </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#orientation">orientation</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#removeItem">removeItem</a></b>(QGraphicsLayoutItem *<i>item</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#setAlignment">setAlignment</a></b>(QGraphicsLayoutItem *<i>item</i>, Qt::Alignment <i>alignment</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#setItemSpacing">setItemSpacing</a></b>(int <i>index</i>, qreal <i>spacing</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#setOrientation">setOrientation</a></b>(Qt::Orientation <i>orientation</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#setSpacing">setSpacing</a></b>(qreal <i>spacing</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#setStretchFactor">setStretchFactor</a></b>(QGraphicsLayoutItem *<i>item</i>, int <i>stretch</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#spacing">spacing</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#stretchFactor">stretchFactor</a></b>(QGraphicsLayoutItem *<i>item</i>) const</td></tr>
</table></div>
<a name="reimplemented-public-functions"></a>
<h2 id="reimplemented-public-functions">Reimplemented Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#count">count</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#invalidate">invalidate</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QGraphicsLayoutItem *</td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#itemAt">itemAt</a></b>(int <i>index</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#removeAt">removeAt</a></b>(int <i>index</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#setGeometry">setGeometry</a></b>(const QRectF &amp;<i>rect</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSizeF </td><td class="memItemRight bottomAlign"><b><a href="qgraphicslinearlayout.html#sizeHint">sizeHint</a></b>(Qt::SizeHint <i>which</i>, const QSizeF &amp;<i>constraint</i> = QSizeF()) const</td></tr>
</table></div>
<ul>
<li class="fn">10 public functions inherited from <a href="qgraphicslayout.html#public-functions">QGraphicsLayout</a></li>
<li class="fn">35 public functions inherited from <a href="qgraphicslayoutitem.html#public-functions">QGraphicsLayoutItem</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 protected function inherited from <a href="qgraphicslayout.html#protected-functions">QGraphicsLayout</a></li>
<li class="fn">3 protected functions inherited from <a href="qgraphicslayoutitem.html#protected-functions">QGraphicsLayoutItem</a></li>
</ul>
<a name="details"></a>
<!-- $$$QGraphicsLinearLayout-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qgraphicslinearlayout.html">QGraphicsLinearLayout</a> class provides a horizontal or vertical layout for managing widgets in Graphics View.</p>
<p>The default orientation for a linear layout is <a href="../qtcore/qt.html#Orientation-enum">Qt::Horizontal</a>. You can choose a vertical orientation either by calling <a href="qgraphicslinearlayout.html#setOrientation">setOrientation</a>(), or by passing <a href="../qtcore/qt.html#Orientation-enum">Qt::Vertical</a> to <a href="qgraphicslinearlayout.html">QGraphicsLinearLayout</a>'s constructor.</p>
<p>The most common way to use <a href="qgraphicslinearlayout.html">QGraphicsLinearLayout</a> is to construct an object on the heap with no parent, add widgets and layouts by calling <a href="qgraphicslinearlayout.html#addItem">addItem</a>(), and finally assign the layout to a widget by calling <a href="qgraphicswidget.html#setLayout">QGraphicsWidget::setLayout</a>().</p>
<pre class="cpp">

  <span class="type"><a href="qgraphicsscene.html">QGraphicsScene</a></span> scene;
  <span class="type"><a href="qgraphicswidget.html">QGraphicsWidget</a></span> <span class="operator">*</span>textEdit <span class="operator">=</span> scene<span class="operator">.</span>addWidget(<span class="keyword">new</span> <span class="type"><a href="qtextedit.html">QTextEdit</a></span>);
  <span class="type"><a href="qgraphicswidget.html">QGraphicsWidget</a></span> <span class="operator">*</span>pushButton <span class="operator">=</span> scene<span class="operator">.</span>addWidget(<span class="keyword">new</span> <span class="type"><a href="qpushbutton.html">QPushButton</a></span>);

  <span class="type"><a href="qgraphicslinearlayout.html#QGraphicsLinearLayout">QGraphicsLinearLayout</a></span> <span class="operator">*</span>layout <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qgraphicslinearlayout.html#QGraphicsLinearLayout">QGraphicsLinearLayout</a></span>;
  layout<span class="operator">-</span><span class="operator">&gt;</span>addItem(textEdit);
  layout<span class="operator">-</span><span class="operator">&gt;</span>addItem(pushButton);

  <span class="type"><a href="qgraphicswidget.html">QGraphicsWidget</a></span> <span class="operator">*</span>form <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qgraphicswidget.html">QGraphicsWidget</a></span>;
  form<span class="operator">-</span><span class="operator">&gt;</span>setLayout(layout);
  scene<span class="operator">.</span>addItem(form);

</pre>
<p>You can add widgets, layouts, stretches (<a href="qgraphicslinearlayout.html#addStretch">addStretch</a>(), <a href="qgraphicslinearlayout.html#insertStretch">insertStretch</a>() or <a href="qgraphicslinearlayout.html#setStretchFactor">setStretchFactor</a>()), and spacings (<a href="qgraphicslinearlayout.html#setItemSpacing">setItemSpacing</a>()) to a linear layout. The layout takes ownership of the items. In some cases when the layout item also inherits from <a href="qgraphicsitem.html">QGraphicsItem</a> (such as <a href="graphicsview.html#qgraphicswidget">QGraphicsWidget</a>) there will be a ambiguity in ownership because the layout item belongs to two ownership hierarchies. See the documentation of <a href="qgraphicslayoutitem.html#setOwnedByLayout">QGraphicsLayoutItem::setOwnedByLayout</a>() how to handle this. You can access each item in the layout by calling <a href="qgraphicslinearlayout.html#count">count</a>() and <a href="qgraphicslinearlayout.html#itemAt">itemAt</a>(). Calling <a href="qgraphicslinearlayout.html#removeAt">removeAt</a>() or <a href="qgraphicslinearlayout.html#removeItem">removeItem</a>() will remove an item from the layout, without destroying it.</p>
<a name="size-hints-and-size-policies-in-qgraphicslinearlayout"></a>
<h3 >Size Hints and Size Policies in QGraphicsLinearLayout</h3>
<p><a href="qgraphicslinearlayout.html">QGraphicsLinearLayout</a> respects each item's size hints and size policies, and when the layout contains more space than the items can fill, each item is arranged according to the layout's alignment for that item. You can set an alignment for each item by calling <a href="qgraphicslinearlayout.html#setAlignment">setAlignment</a>(), and check the alignment for any item by calling <a href="qgraphicslinearlayout.html#alignment">alignment</a>(). By default, items are aligned to the top left.</p>
<a name="spacing-within-qgraphicslinearlayout"></a>
<h3 >Spacing within QGraphicsLinearLayout</h3>
<p>Between the items, the layout distributes some space. The actual amount of space depends on the managed widget's current style, but the common spacing is 4. You can also set your own spacing by calling <a href="qgraphicslinearlayout.html#setSpacing">setSpacing</a>(), and get the current spacing value by calling <a href="qgraphicslinearlayout.html#spacing">spacing</a>(). If you want to configure individual spacing for your items, you can call <a href="qgraphicslinearlayout.html#setItemSpacing">setItemSpacing</a>().</p>
<a name="stretch-factor-in-qgraphicslinearlayout"></a>
<h3 >Stretch Factor in QGraphicsLinearLayout</h3>
<p>You can assign a stretch factor to each item to control how much space it will get compared to the other items. By default, two identical widgets arranged in a linear layout will have the same size, but if the first widget has a stretch factor of 1 and the second widget has a stretch factor of 2, the first widget will get 1/3 of the available space, and the second will get 2/3.</p>
<p><a href="qgraphicslinearlayout.html">QGraphicsLinearLayout</a> calculates the distribution of sizes by adding up the stretch factors of all items, and then dividing the available space accordingly. The default stretch factor is 0 for all items; a factor of 0 means the item does not have any defined stretch factor; effectively this is the same as setting the stretch factor to 1. The stretch factor only applies to the available space in the lengthwise direction of the layout (following its orientation). If you want to control both the item's horizontal and vertical stretch, you can use <a href="qgraphicsgridlayout.html">QGraphicsGridLayout</a> instead.</p>
<a name="qgraphicslinearlayout-compared-to-other-layouts"></a>
<h3 >QGraphicsLinearLayout Compared to Other Layouts</h3>
<p><a href="qgraphicslinearlayout.html">QGraphicsLinearLayout</a> is very similar to <a href="qvboxlayout.html">QVBoxLayout</a> and <a href="qhboxlayout.html">QHBoxLayout</a>, but in contrast to these classes, it is used to manage <a href="graphicsview.html#qgraphicswidget">QGraphicsWidget</a> and <a href="graphicsview.html#qgraphicslayout">QGraphicsLayout</a> instead of <a href="qwidget.html">QWidget</a> and <a href="qlayout.html">QLayout</a>.</p>
</div>
<p><b>See also </b><a href="qgraphicsgridlayout.html">QGraphicsGridLayout</a> and <a href="graphicsview.html#qgraphicswidget">QGraphicsWidget</a>.</p>
<!-- @@@QGraphicsLinearLayout -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QGraphicsLinearLayout[overload1]$$$QGraphicsLinearLayoutQGraphicsLayoutItem* -->
<h3 class="fn" id="QGraphicsLinearLayout"><a name="QGraphicsLinearLayout"></a>QGraphicsLinearLayout::<span class="name">QGraphicsLinearLayout</span>(<span class="type"><a href="qgraphicslayoutitem.html#QGraphicsLayoutItem">QGraphicsLayoutItem</a></span> *<i>parent</i> = Q_NULLPTR)</h3>
<p>Constructs a <a href="qgraphicslinearlayout.html">QGraphicsLinearLayout</a> instance using <a href="../qtcore/qt.html#Orientation-enum">Qt::Horizontal</a> orientation. <i>parent</i> is passed to <a href="graphicsview.html#qgraphicslayout">QGraphicsLayout</a>'s constructor.</p>
<!-- @@@QGraphicsLinearLayout -->
<!-- $$$QGraphicsLinearLayout$$$QGraphicsLinearLayoutQt::OrientationQGraphicsLayoutItem* -->
<h3 class="fn" id="QGraphicsLinearLayout-1"><a name="QGraphicsLinearLayout-1"></a>QGraphicsLinearLayout::<span class="name">QGraphicsLinearLayout</span>(<span class="type"><a href="../qtcore/qt.html#Orientation-enum">Qt::Orientation</a></span> <i>orientation</i>, <span class="type"><a href="qgraphicslayoutitem.html#QGraphicsLayoutItem">QGraphicsLayoutItem</a></span> *<i>parent</i> = Q_NULLPTR)</h3>
<p>Constructs a <a href="qgraphicslinearlayout.html">QGraphicsLinearLayout</a> instance. You can pass the <i>orientation</i> for the layout, either horizontal or vertical, and <i>parent</i> is passed to <a href="graphicsview.html#qgraphicslayout">QGraphicsLayout</a>'s constructor.</p>
<!-- @@@QGraphicsLinearLayout -->
<!-- $$$~QGraphicsLinearLayout[overload1]$$$~QGraphicsLinearLayout -->
<h3 class="fn" id="dtor.QGraphicsLinearLayout"><a name="dtor.QGraphicsLinearLayout"></a><code>[virtual] </code>QGraphicsLinearLayout::<span class="name">~QGraphicsLinearLayout</span>()</h3>
<p>Destroys the <a href="qgraphicslinearlayout.html">QGraphicsLinearLayout</a> object.</p>
<!-- @@@~QGraphicsLinearLayout -->
<!-- $$$addItem[overload1]$$$addItemQGraphicsLayoutItem* -->
<h3 class="fn" id="addItem"><a name="addItem"></a><span class="type">void</span> QGraphicsLinearLayout::<span class="name">addItem</span>(<span class="type"><a href="qgraphicslayoutitem.html#QGraphicsLayoutItem">QGraphicsLayoutItem</a></span> *<i>item</i>)</h3>
<p>This convenience function is equivalent to calling <a href="qgraphicslinearlayout.html#insertItem">insertItem</a>(-1, <i>item</i>).</p>
<!-- @@@addItem -->
<!-- $$$addStretch[overload1]$$$addStretchint -->
<h3 class="fn" id="addStretch"><a name="addStretch"></a><span class="type">void</span> QGraphicsLinearLayout::<span class="name">addStretch</span>(<span class="type">int</span> <i>stretch</i> = 1)</h3>
<p>This convenience function is equivalent to calling <a href="qgraphicslinearlayout.html#insertStretch">insertStretch</a>(-1, <i>stretch</i>).</p>
<!-- @@@addStretch -->
<!-- $$$alignment[overload1]$$$alignmentQGraphicsLayoutItem* -->
<h3 class="fn" id="alignment"><a name="alignment"></a><span class="type"><a href="../qtcore/qt.html#AlignmentFlag-enum">Qt::Alignment</a></span> QGraphicsLinearLayout::<span class="name">alignment</span>(<span class="type"><a href="qgraphicslayoutitem.html#QGraphicsLayoutItem">QGraphicsLayoutItem</a></span> *<i>item</i>) const</h3>
<p>Returns the alignment for <i>item</i>. The default alignment is <a href="../qtcore/qt.html#AlignmentFlag-enum">Qt::AlignTop</a> | <a href="../qtcore/qt.html#AlignmentFlag-enum">Qt::AlignLeft</a>.</p>
<p>The alignment decides how the item is positioned within its assigned space in the case where there's more space available in the layout than the widgets can occupy.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#setAlignment">setAlignment</a>().</p>
<!-- @@@alignment -->
<!-- $$$count[overload1]$$$count -->
<h3 class="fn" id="count"><a name="count"></a><code>[virtual] </code><span class="type">int</span> QGraphicsLinearLayout::<span class="name">count</span>() const</h3>
<p>Reimplemented from <a href="qgraphicslayout.html#count">QGraphicsLayout::count</a>().</p>
<!-- @@@count -->
<!-- $$$insertItem[overload1]$$$insertItemintQGraphicsLayoutItem* -->
<h3 class="fn" id="insertItem"><a name="insertItem"></a><span class="type">void</span> QGraphicsLinearLayout::<span class="name">insertItem</span>(<span class="type">int</span> <i>index</i>, <span class="type"><a href="qgraphicslayoutitem.html#QGraphicsLayoutItem">QGraphicsLayoutItem</a></span> *<i>item</i>)</h3>
<p>Inserts <i>item</i> into the layout at <i>index</i>, or before any item that is currently at <i>index</i>.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#addItem">addItem</a>(), <a href="qgraphicslinearlayout.html#itemAt">itemAt</a>(), <a href="qgraphicslinearlayout.html#insertStretch">insertStretch</a>(), and <a href="qgraphicslinearlayout.html#setItemSpacing">setItemSpacing</a>().</p>
<!-- @@@insertItem -->
<!-- $$$insertStretch[overload1]$$$insertStretchintint -->
<h3 class="fn" id="insertStretch"><a name="insertStretch"></a><span class="type">void</span> QGraphicsLinearLayout::<span class="name">insertStretch</span>(<span class="type">int</span> <i>index</i>, <span class="type">int</span> <i>stretch</i> = 1)</h3>
<p>Inserts a stretch of <i>stretch</i> at <i>index</i>, or before any item that is currently at <i>index</i>.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#addStretch">addStretch</a>(), <a href="qgraphicslinearlayout.html#setStretchFactor">setStretchFactor</a>(), <a href="qgraphicslinearlayout.html#setItemSpacing">setItemSpacing</a>(), and <a href="qgraphicslinearlayout.html#insertItem">insertItem</a>().</p>
<!-- @@@insertStretch -->
<!-- $$$invalidate[overload1]$$$invalidate -->
<h3 class="fn" id="invalidate"><a name="invalidate"></a><code>[virtual] </code><span class="type">void</span> QGraphicsLinearLayout::<span class="name">invalidate</span>()</h3>
<p>Reimplemented from <a href="qgraphicslayout.html#invalidate">QGraphicsLayout::invalidate</a>().</p>
<!-- @@@invalidate -->
<!-- $$$itemAt[overload1]$$$itemAtint -->
<h3 class="fn" id="itemAt"><a name="itemAt"></a><code>[virtual] </code><span class="type"><a href="qgraphicslayoutitem.html#QGraphicsLayoutItem">QGraphicsLayoutItem</a></span> *QGraphicsLinearLayout::<span class="name">itemAt</span>(<span class="type">int</span> <i>index</i>) const</h3>
<p>Reimplemented from <a href="qgraphicslayout.html#itemAt">QGraphicsLayout::itemAt</a>().</p>
<p>When iterating from 0 and up, it will return the items in the visual arranged order.</p>
<!-- @@@itemAt -->
<!-- $$$itemSpacing[overload1]$$$itemSpacingint -->
<h3 class="fn" id="itemSpacing"><a name="itemSpacing"></a><span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> QGraphicsLinearLayout::<span class="name">itemSpacing</span>(<span class="type">int</span> <i>index</i>) const</h3>
<p>Returns the spacing after item at <i>index</i>.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#setItemSpacing">setItemSpacing</a>().</p>
<!-- @@@itemSpacing -->
<!-- $$$orientation[overload1]$$$orientation -->
<h3 class="fn" id="orientation"><a name="orientation"></a><span class="type"><a href="../qtcore/qt.html#Orientation-enum">Qt::Orientation</a></span> QGraphicsLinearLayout::<span class="name">orientation</span>() const</h3>
<p>Returns the layout orientation.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#setOrientation">setOrientation</a>().</p>
<!-- @@@orientation -->
<!-- $$$removeAt[overload1]$$$removeAtint -->
<h3 class="fn" id="removeAt"><a name="removeAt"></a><code>[virtual] </code><span class="type">void</span> QGraphicsLinearLayout::<span class="name">removeAt</span>(<span class="type">int</span> <i>index</i>)</h3>
<p>Reimplemented from <a href="qgraphicslayout.html#removeAt">QGraphicsLayout::removeAt</a>().</p>
<p>Removes the item at <i>index</i> without destroying it. Ownership of the item is transferred to the caller.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#removeItem">removeItem</a>() and <a href="qgraphicslinearlayout.html#insertItem">insertItem</a>().</p>
<!-- @@@removeAt -->
<!-- $$$removeItem[overload1]$$$removeItemQGraphicsLayoutItem* -->
<h3 class="fn" id="removeItem"><a name="removeItem"></a><span class="type">void</span> QGraphicsLinearLayout::<span class="name">removeItem</span>(<span class="type"><a href="qgraphicslayoutitem.html#QGraphicsLayoutItem">QGraphicsLayoutItem</a></span> *<i>item</i>)</h3>
<p>Removes <i>item</i> from the layout without destroying it. Ownership of <i>item</i> is transferred to the caller.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#removeAt">removeAt</a>() and <a href="qgraphicslinearlayout.html#insertItem">insertItem</a>().</p>
<!-- @@@removeItem -->
<!-- $$$setAlignment[overload1]$$$setAlignmentQGraphicsLayoutItem*Qt::Alignment -->
<h3 class="fn" id="setAlignment"><a name="setAlignment"></a><span class="type">void</span> QGraphicsLinearLayout::<span class="name">setAlignment</span>(<span class="type"><a href="qgraphicslayoutitem.html#QGraphicsLayoutItem">QGraphicsLayoutItem</a></span> *<i>item</i>, <span class="type"><a href="../qtcore/qt.html#AlignmentFlag-enum">Qt::Alignment</a></span> <i>alignment</i>)</h3>
<p>Sets the alignment of <i>item</i> to <i>alignment</i>. If <i>item</i>'s alignment changes, the layout is automatically invalidated.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#alignment">alignment</a>() and <a href="qgraphicslinearlayout.html#invalidate">invalidate</a>().</p>
<!-- @@@setAlignment -->
<!-- $$$setGeometry[overload1]$$$setGeometryconstQRectF& -->
<h3 class="fn" id="setGeometry"><a name="setGeometry"></a><code>[virtual] </code><span class="type">void</span> QGraphicsLinearLayout::<span class="name">setGeometry</span>(const <span class="type"><a href="../qtcore/qrectf.html">QRectF</a></span> &amp;<i>rect</i>)</h3>
<p>Reimplemented from <a href="qgraphicslayoutitem.html#setGeometry">QGraphicsLayoutItem::setGeometry</a>().</p>
<!-- @@@setGeometry -->
<!-- $$$setItemSpacing[overload1]$$$setItemSpacingintqreal -->
<h3 class="fn" id="setItemSpacing"><a name="setItemSpacing"></a><span class="type">void</span> QGraphicsLinearLayout::<span class="name">setItemSpacing</span>(<span class="type">int</span> <i>index</i>, <span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>spacing</i>)</h3>
<p>Sets the spacing after item at <i>index</i> to <i>spacing</i>.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#itemSpacing">itemSpacing</a>().</p>
<!-- @@@setItemSpacing -->
<!-- $$$setOrientation[overload1]$$$setOrientationQt::Orientation -->
<h3 class="fn" id="setOrientation"><a name="setOrientation"></a><span class="type">void</span> QGraphicsLinearLayout::<span class="name">setOrientation</span>(<span class="type"><a href="../qtcore/qt.html#Orientation-enum">Qt::Orientation</a></span> <i>orientation</i>)</h3>
<p>Change the layout orientation to <i>orientation</i>. Changing the layout orientation will automatically invalidate the layout.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#orientation">orientation</a>().</p>
<!-- @@@setOrientation -->
<!-- $$$setSpacing[overload1]$$$setSpacingqreal -->
<h3 class="fn" id="setSpacing"><a name="setSpacing"></a><span class="type">void</span> QGraphicsLinearLayout::<span class="name">setSpacing</span>(<span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> <i>spacing</i>)</h3>
<p>Sets the layout's spacing to <i>spacing</i>. Spacing refers to the vertical and horizontal distances between items.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#spacing">spacing</a>(), <a href="qgraphicslinearlayout.html#setItemSpacing">setItemSpacing</a>(), <a href="qgraphicslinearlayout.html#setStretchFactor">setStretchFactor</a>(), and <a href="qgraphicsgridlayout.html#setSpacing">QGraphicsGridLayout::setSpacing</a>().</p>
<!-- @@@setSpacing -->
<!-- $$$setStretchFactor[overload1]$$$setStretchFactorQGraphicsLayoutItem*int -->
<h3 class="fn" id="setStretchFactor"><a name="setStretchFactor"></a><span class="type">void</span> QGraphicsLinearLayout::<span class="name">setStretchFactor</span>(<span class="type"><a href="qgraphicslayoutitem.html#QGraphicsLayoutItem">QGraphicsLayoutItem</a></span> *<i>item</i>, <span class="type">int</span> <i>stretch</i>)</h3>
<p>Sets the stretch factor for <i>item</i> to <i>stretch</i>. If an item's stretch factor changes, this function will invalidate the layout.</p>
<p>Setting <i>stretch</i> to 0 removes the stretch factor from the item, and is effectively equivalent to setting <i>stretch</i> to 1.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#stretchFactor">stretchFactor</a>().</p>
<!-- @@@setStretchFactor -->
<!-- $$$sizeHint[overload1]$$$sizeHintQt::SizeHintconstQSizeF& -->
<h3 class="fn" id="sizeHint"><a name="sizeHint"></a><code>[virtual] </code><span class="type"><a href="../qtcore/qsizef.html">QSizeF</a></span> QGraphicsLinearLayout::<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>Reimplemented from <a href="qgraphicslayoutitem.html#sizeHint">QGraphicsLayoutItem::sizeHint</a>().</p>
<!-- @@@sizeHint -->
<!-- $$$spacing[overload1]$$$spacing -->
<h3 class="fn" id="spacing"><a name="spacing"></a><span class="type"><a href="../qtcore/qtglobal.html#qreal-typedef">qreal</a></span> QGraphicsLinearLayout::<span class="name">spacing</span>() const</h3>
<p>Returns the layout's spacing. Spacing refers to the vertical and horizontal distances between items.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#setSpacing">setSpacing</a>().</p>
<!-- @@@spacing -->
<!-- $$$stretchFactor[overload1]$$$stretchFactorQGraphicsLayoutItem* -->
<h3 class="fn" id="stretchFactor"><a name="stretchFactor"></a><span class="type">int</span> QGraphicsLinearLayout::<span class="name">stretchFactor</span>(<span class="type"><a href="qgraphicslayoutitem.html#QGraphicsLayoutItem">QGraphicsLayoutItem</a></span> *<i>item</i>) const</h3>
<p>Returns the stretch factor for <i>item</i>. The default stretch factor is 0, meaning that the item has no assigned stretch factor.</p>
<p><b>See also </b><a href="qgraphicslinearlayout.html#setStretchFactor">setStretchFactor</a>().</p>
<!-- @@@stretchFactor -->
</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>