Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 536

python-qt4-doc-4.10.3-3.mga4.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QBoxLayout Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QBoxLayout Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QBoxLayout class lines up child widgets horizontally or
vertically. <a href="#details">More...</a></p>

<p>Inherits <a href="qlayout.html">QLayout</a>.</p><p>Inherited by <a href="qhboxlayout.html">QHBoxLayout</a> and <a href="qvboxlayout.html">QVBoxLayout</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qboxlayout.html#Direction-enum">Direction</a></b> { LeftToRight, RightToLeft, TopToBottom, BottomToTop, Down, Up }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qboxlayout.html#QBoxLayout">__init__</a></b> (<i>self</i>, Direction&#160;<i>direction</i>, QWidget&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qboxlayout.html#addItem">addItem</a></b> (<i>self</i>, QLayoutItem)</li><li><div class="fn" /><b><a href="qboxlayout.html#addLayout">addLayout</a></b> (<i>self</i>, QLayout&#160;<i>layout</i>, int&#160;<i>stretch</i>&#160;=&#160;0)</li><li><div class="fn" /><b><a href="qboxlayout.html#addSpacerItem">addSpacerItem</a></b> (<i>self</i>, QSpacerItem&#160;<i>spacerItem</i>)</li><li><div class="fn" /><b><a href="qboxlayout.html#addSpacing">addSpacing</a></b> (<i>self</i>, int&#160;<i>size</i>)</li><li><div class="fn" /><b><a href="qboxlayout.html#addStretch">addStretch</a></b> (<i>self</i>, int&#160;<i>stretch</i>&#160;=&#160;0)</li><li><div class="fn" /><b><a href="qboxlayout.html#addStrut">addStrut</a></b> (<i>self</i>, int)</li><li><div class="fn" /><b><a href="qboxlayout.html#addWidget">addWidget</a></b> (<i>self</i>, QWidget, int&#160;<i>stretch</i>&#160;=&#160;0, Qt.Alignment&#160;<i>alignment</i>&#160;=&#160;0)</li><li><div class="fn" />int <b><a href="qboxlayout.html#count">count</a></b> (<i>self</i>)</li><li><div class="fn" />Direction <b><a href="qboxlayout.html#direction">direction</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.Orientations <b><a href="qboxlayout.html#expandingDirections">expandingDirections</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qboxlayout.html#hasHeightForWidth">hasHeightForWidth</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qboxlayout.html#heightForWidth">heightForWidth</a></b> (<i>self</i>, int)</li><li><div class="fn" /><b><a href="qboxlayout.html#insertItem">insertItem</a></b> (<i>self</i>, int&#160;<i>index</i>, QLayoutItem)</li><li><div class="fn" /><b><a href="qboxlayout.html#insertLayout">insertLayout</a></b> (<i>self</i>, int&#160;<i>index</i>, QLayout&#160;<i>layout</i>, int&#160;<i>stretch</i>&#160;=&#160;0)</li><li><div class="fn" /><b><a href="qboxlayout.html#insertSpacerItem">insertSpacerItem</a></b> (<i>self</i>, int&#160;<i>index</i>, QSpacerItem&#160;<i>spacerItem</i>)</li><li><div class="fn" /><b><a href="qboxlayout.html#insertSpacing">insertSpacing</a></b> (<i>self</i>, int&#160;<i>index</i>, int&#160;<i>size</i>)</li><li><div class="fn" /><b><a href="qboxlayout.html#insertStretch">insertStretch</a></b> (<i>self</i>, int&#160;<i>index</i>, int&#160;<i>stretch</i>&#160;=&#160;0)</li><li><div class="fn" /><b><a href="qboxlayout.html#insertWidget">insertWidget</a></b> (<i>self</i>, int&#160;<i>index</i>, QWidget&#160;<i>widget</i>, int&#160;<i>stretch</i>&#160;=&#160;0, Qt.Alignment&#160;<i>alignment</i>&#160;=&#160;0)</li><li><div class="fn" /><b><a href="qboxlayout.html#invalidate">invalidate</a></b> (<i>self</i>)</li><li><div class="fn" />QLayoutItem <b><a href="qboxlayout.html#itemAt">itemAt</a></b> (<i>self</i>, int)</li><li><div class="fn" />QSize <b><a href="qboxlayout.html#maximumSize">maximumSize</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qboxlayout.html#minimumHeightForWidth">minimumHeightForWidth</a></b> (<i>self</i>, int)</li><li><div class="fn" />QSize <b><a href="qboxlayout.html#minimumSize">minimumSize</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qboxlayout.html#setDirection">setDirection</a></b> (<i>self</i>, Direction)</li><li><div class="fn" /><b><a href="qboxlayout.html#setGeometry">setGeometry</a></b> (<i>self</i>, QRect)</li><li><div class="fn" /><b><a href="qboxlayout.html#setSpacing">setSpacing</a></b> (<i>self</i>, int&#160;<i>spacing</i>)</li><li><div class="fn" /><b><a href="qboxlayout.html#setStretch">setStretch</a></b> (<i>self</i>, int&#160;<i>index</i>, int&#160;<i>stretch</i>)</li><li><div class="fn" />bool <b><a href="qboxlayout.html#setStretchFactor">setStretchFactor</a></b> (<i>self</i>, QWidget&#160;<i>w</i>, int&#160;<i>stretch</i>)</li><li><div class="fn" />bool <b><a href="qboxlayout.html#setStretchFactor-2">setStretchFactor</a></b> (<i>self</i>, QLayout&#160;<i>l</i>, int&#160;<i>stretch</i>)</li><li><div class="fn" />QSize <b><a href="qboxlayout.html#sizeHint">sizeHint</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qboxlayout.html#spacing">spacing</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qboxlayout.html#stretch">stretch</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />QLayoutItem <b><a href="qboxlayout.html#takeAt">takeAt</a></b> (<i>self</i>, int)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QBoxLayout class lines up child widgets horizontally or
vertically.</p>
<p>QBoxLayout takes the space it gets (from its parent layout or
from the <a href="qlayout.html#parentWidget">parentWidget</a>()),
divides it up into a row of boxes, and makes each managed widget
fill one box.</p>
<p class="centerAlign"><img alt="Horizontal box layout with five child widgets" src="images/qhboxlayout-with-5-children.png" /></p>
<p>If the QBoxLayout's orientation is <a href="qt.html#Orientation-enum">Qt.Horizontal</a> the boxes are placed
in a row, with suitable sizes. Each widget (or other box) will get
at least its minimum size and at most its maximum size. Any excess
space is shared according to the stretch factors (more about that
below).</p>
<p class="centerAlign"><img alt="Vertical box layout with five child widgets" src="images/qvboxlayout-with-5-children.png" /></p>
<p>If the QBoxLayout's orientation is <a href="qt.html#Orientation-enum">Qt.Vertical</a>, the boxes are placed
in a column, again with suitable sizes.</p>
<p>The easiest way to create a QBoxLayout is to use one of the
convenience classes, e.g. <a href="qhboxlayout.html">QHBoxLayout</a> (for <a href="qt.html#Orientation-enum">Qt.Horizontal</a> boxes) or <a href="qvboxlayout.html">QVBoxLayout</a> (for <a href="qt.html#Orientation-enum">Qt.Vertical</a> boxes). You can also
use the QBoxLayout constructor directly, specifying its direction
as <a href="qboxlayout.html#Direction-enum">LeftToRight</a>,
<a href="qboxlayout.html#Direction-enum">RightToLeft</a>, <a href="qboxlayout.html#Direction-enum">TopToBottom</a>, or <a href="qboxlayout.html#Direction-enum">BottomToTop</a>.</p>
<p>If the QBoxLayout is not the top-level layout (i.e. it is not
managing all of the widget's area and children), you must add it to
its parent layout before you can do anything with it. The normal
way to add a layout is by calling parentLayout-&gt;<a href="qboxlayout.html#addLayout">addLayout</a>().</p>
<p>Once you have done this, you can add boxes to the QBoxLayout
using one of four functions:</p>
<ul>
<li><a href="qboxlayout.html#addWidget">addWidget</a>() to add a
widget to the QBoxLayout and set the widget's stretch factor. (The
stretch factor is along the row of boxes.)</li>
<li><a href="qboxlayout.html#addSpacing">addSpacing</a>() to create
an empty box; this is one of the functions you use to create nice
and spacious dialogs. See below for ways to set margins.</li>
<li><a href="qboxlayout.html#addStretch">addStretch</a>() to create
an empty, stretchable box.</li>
<li><a href="qboxlayout.html#addLayout">addLayout</a>() to add a
box containing another <a href="qlayout.html">QLayout</a> to the
row and set that layout's stretch factor.</li>
</ul>
<p>Use <a href="qboxlayout.html#insertWidget">insertWidget</a>(),
<a href="qboxlayout.html#insertSpacing">insertSpacing</a>(),
<a href="qboxlayout.html#insertStretch">insertStretch</a>() or
<a href="qboxlayout.html#insertLayout">insertLayout</a>() to insert
a box at a specified position in the layout.</p>
<p>QBoxLayout also includes two margin widths:</p>
<ul>
<li><a href="qlayout.html#setContentsMargins">setContentsMargins</a>() sets the
width of the outer border on each side of the widget. This is the
width of the reserved space along each of the QBoxLayout's four
sides.</li>
<li><a href="qboxlayout.html#setSpacing">setSpacing</a>() sets the
width between neighboring boxes. (You can use <a href="qboxlayout.html#addSpacing">addSpacing</a>() to get more space at
a particular spot.)</li>
</ul>
<p>The margin default is provided by the style. The default margin
most Qt styles specify is 9 for child widgets and 11 for windows.
The spacing defaults to the same as the margin width for a
top-level layout, or to the same as the parent layout.</p>
<p>To remove a widget from a layout, call <a href="qlayout.html#removeWidget">removeWidget</a>(). Calling <a href="qwidget.html#hide">QWidget.hide</a>() on a widget also
effectively removes the widget from the layout until <a href="qwidget.html#show">QWidget.show</a>() is called.</p>
<p>You will almost always want to use <a href="qvboxlayout.html">QVBoxLayout</a> and <a href="qhboxlayout.html">QHBoxLayout</a> rather than QBoxLayout because
of their convenient constructors.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="Direction-enum" />QBoxLayout.Direction</h3><p>This type is used to determine the direction of a box
layout.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QBoxLayout.LeftToRight</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">Horizontal from left to right.</td>
</tr>
<tr>
<td class="topAlign"><tt>QBoxLayout.RightToLeft</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">Horizontal from right to left.</td>
</tr>
<tr>
<td class="topAlign"><tt>QBoxLayout.TopToBottom</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">Vertical from top to bottom.</td>
</tr>
<tr>
<td class="topAlign"><tt>QBoxLayout.BottomToTop</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">Vertical from bottom to top.</td>
</tr>
</table>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QBoxLayout" />QBoxLayout.__init__ (<i>self</i>, <a href="qboxlayout.html#Direction-enum">Direction</a>&#160;<i>direction</i>, <a href="qwidget.html">QWidget</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a new <a href="qboxlayout.html">QBoxLayout</a> with
direction <i>dir</i> and parent widget <i>parent</i>.</p>
<p><b>See also</b> <a href="qboxlayout.html#direction">direction</a>().</p>


<h3 class="fn"><a name="addItem" />QBoxLayout.addItem (<i>self</i>, <a href="qlayoutitem.html">QLayoutItem</a>)</h3><p>The <i>QLayoutItem</i> argument has it's ownership transferred to Qt.</p><p>Reimplemented from <a href="qlayout.html#addItem">QLayout.addItem</a>().</p>


<h3 class="fn"><a name="addLayout" />QBoxLayout.addLayout (<i>self</i>, <a href="qlayout.html">QLayout</a>&#160;<i>layout</i>, int&#160;<i>stretch</i>&#160;=&#160;0)</h3><p>The <i>layout</i> argument has it's ownership transferred to Qt.</p><p>Adds <i>layout</i> to the end of the box, with serial stretch
factor <i>stretch</i>.</p>
<p><b>See also</b> <a href="qboxlayout.html#insertLayout">insertLayout</a>(), <a href="qboxlayout.html#addItem">addItem</a>(), and <a href="qboxlayout.html#addWidget">addWidget</a>().</p>


<h3 class="fn"><a name="addSpacerItem" />QBoxLayout.addSpacerItem (<i>self</i>, <a href="qspaceritem.html">QSpacerItem</a>&#160;<i>spacerItem</i>)</h3><p>The <i>spacerItem</i> argument has it's ownership transferred to Qt.</p><p>Adds <i>spacerItem</i> to the end of this box layout.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also</b> <a href="qboxlayout.html#addSpacing">addSpacing</a>() and <a href="qboxlayout.html#addStretch">addStretch</a>().</p>


<h3 class="fn"><a name="addSpacing" />QBoxLayout.addSpacing (<i>self</i>, int&#160;<i>size</i>)</h3><p>Adds a non-stretchable space (a <a href="qspaceritem.html">QSpacerItem</a>) with size <i>size</i> to the
end of this box layout. <a href="qboxlayout.html">QBoxLayout</a>
provides default margin and spacing. This function adds additional
space.</p>
<p><b>See also</b> <a href="qboxlayout.html#insertSpacing">insertSpacing</a>(), <a href="qboxlayout.html#addItem">addItem</a>(), and <a href="qspaceritem.html">QSpacerItem</a>.</p>


<h3 class="fn"><a name="addStretch" />QBoxLayout.addStretch (<i>self</i>, int&#160;<i>stretch</i>&#160;=&#160;0)</h3><p>Adds a stretchable space (a <a href="qspaceritem.html">QSpacerItem</a>) with zero minimum size and
stretch factor <i>stretch</i> to the end of this box layout.</p>
<p><b>See also</b> <a href="qboxlayout.html#insertStretch">insertStretch</a>(), <a href="qboxlayout.html#addItem">addItem</a>(), and <a href="qspaceritem.html">QSpacerItem</a>.</p>


<h3 class="fn"><a name="addStrut" />QBoxLayout.addStrut (<i>self</i>, int)</h3><p>Limits the perpendicular dimension of the box (e.g. height if
the box is <a href="qboxlayout.html#Direction-enum">LeftToRight</a>) to a minimum of
<i>size</i>. Other constraints may increase the limit.</p>
<p><b>See also</b> <a href="qboxlayout.html#addItem">addItem</a>().</p>


<h3 class="fn"><a name="addWidget" />QBoxLayout.addWidget (<i>self</i>, <a href="qwidget.html">QWidget</a>, int&#160;<i>stretch</i>&#160;=&#160;0, <a href="qt-alignment.html">Qt.Alignment</a>&#160;<i>alignment</i>&#160;=&#160;0)</h3><p>The <i>QWidget</i> argument has it's ownership transferred to Qt.</p><p>Adds <i>widget</i> to the end of this box layout, with a stretch
factor of <i>stretch</i> and alignment <i>alignment</i>.</p>
<p>The stretch factor applies only in the <a href="qboxlayout.html#direction">direction</a> of the <a href="qboxlayout.html">QBoxLayout</a>, and is relative to the other
boxes and widgets in this <a href="qboxlayout.html">QBoxLayout</a>.
Widgets and boxes with higher stretch factors grow more.</p>
<p>If the stretch factor is 0 and nothing else in the <a href="qboxlayout.html">QBoxLayout</a> has a stretch factor greater than
zero, the space is distributed according to the <a href="qwidget.html">QWidget</a>:sizePolicy() of each widget that's
involved.</p>
<p>The alignment is specified by <i>alignment</i>. The default
alignment is 0, which means that the widget fills the entire
cell.</p>
<p><b>See also</b> <a href="qboxlayout.html#insertWidget">insertWidget</a>(), <a href="qboxlayout.html#addItem">addItem</a>(), <a href="qboxlayout.html#addLayout">addLayout</a>(), <a href="qboxlayout.html#addStretch">addStretch</a>(), <a href="qboxlayout.html#addSpacing">addSpacing</a>(), and <a href="qboxlayout.html#addStrut">addStrut</a>().</p>


<h3 class="fn"><a name="count" />int QBoxLayout.count (<i>self</i>)</h3><p>Reimplemented from <a href="qlayout.html#count">QLayout.count</a>().</p>


<h3 class="fn"><a name="direction" /><a href="qboxlayout.html#Direction-enum">Direction</a> QBoxLayout.direction (<i>self</i>)</h3><p>Returns the direction of the box. <a href="qboxlayout.html#addWidget">addWidget</a>() and <a href="qboxlayout.html#addSpacing">addSpacing</a>() work in this
direction; the stretch stretches in this direction.</p>
<p><b>See also</b> <a href="qboxlayout.html#setDirection">setDirection</a>(), <a href="qboxlayout.html#Direction-enum">QBoxLayout.Direction</a>,
<a href="qboxlayout.html#addWidget">addWidget</a>(), and <a href="qboxlayout.html#addSpacing">addSpacing</a>().</p>


<h3 class="fn"><a name="expandingDirections" /><a href="qt-orientations.html">Qt.Orientations</a> QBoxLayout.expandingDirections (<i>self</i>)</h3><p>Reimplemented from <a href="qlayoutitem.html#expandingDirections">QLayoutItem.expandingDirections</a>().</p>


<h3 class="fn"><a name="hasHeightForWidth" />bool QBoxLayout.hasHeightForWidth (<i>self</i>)</h3><p>Reimplemented from <a href="qlayoutitem.html#hasHeightForWidth">QLayoutItem.hasHeightForWidth</a>().</p>


<h3 class="fn"><a name="heightForWidth" />int QBoxLayout.heightForWidth (<i>self</i>, int)</h3><p>Reimplemented from <a href="qlayoutitem.html#heightForWidth">QLayoutItem.heightForWidth</a>().</p>


<h3 class="fn"><a name="insertItem" />QBoxLayout.insertItem (<i>self</i>, int&#160;<i>index</i>, <a href="qlayoutitem.html">QLayoutItem</a>)</h3><p>The <i>QLayoutItem</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Inserts <i>item</i> into this box layout at position
<i>index</i>. If <i>index</i> is negative, the item is added at the
end.</p>
<p><b>See also</b> <a href="qboxlayout.html#addItem">addItem</a>(),
<a href="qboxlayout.html#insertWidget">insertWidget</a>(), <a href="qboxlayout.html#insertLayout">insertLayout</a>(), <a href="qboxlayout.html#insertStretch">insertStretch</a>(), and <a href="qboxlayout.html#insertSpacing">insertSpacing</a>().</p>


<h3 class="fn"><a name="insertLayout" />QBoxLayout.insertLayout (<i>self</i>, int&#160;<i>index</i>, <a href="qlayout.html">QLayout</a>&#160;<i>layout</i>, int&#160;<i>stretch</i>&#160;=&#160;0)</h3><p>The <i>layout</i> argument has it's ownership transferred to Qt.</p><p>Inserts <i>layout</i> at position <i>index</i>, with stretch
factor <i>stretch</i>. If <i>index</i> is negative, the layout is
added at the end.</p>
<p><i>layout</i> becomes a child of the box layout.</p>
<p><b>See also</b> <a href="qboxlayout.html#addLayout">addLayout</a>() and <a href="qboxlayout.html#insertItem">insertItem</a>().</p>


<h3 class="fn"><a name="insertSpacerItem" />QBoxLayout.insertSpacerItem (<i>self</i>, int&#160;<i>index</i>, <a href="qspaceritem.html">QSpacerItem</a>&#160;<i>spacerItem</i>)</h3><p>The <i>spacerItem</i> argument has it's ownership transferred to Qt.</p><p>Inserts <i>spacerItem</i> at position <i>index</i>, with zero
minimum size and stretch factor. If <i>index</i> is negative the
space is added at the end.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also</b> <a href="qboxlayout.html#addSpacerItem">addSpacerItem</a>(), <a href="qboxlayout.html#insertStretch">insertStretch</a>(), and <a href="qboxlayout.html#insertSpacing">insertSpacing</a>().</p>


<h3 class="fn"><a name="insertSpacing" />QBoxLayout.insertSpacing (<i>self</i>, int&#160;<i>index</i>, int&#160;<i>size</i>)</h3><p>Inserts a non-stretchable space (a <a href="qspaceritem.html">QSpacerItem</a>) at position <i>index</i>, with
size <i>size</i>. If <i>index</i> is negative the space is added at
the end.</p>
<p>The box layout has default margin and spacing. This function
adds additional space.</p>
<p><b>See also</b> <a href="qboxlayout.html#addSpacing">addSpacing</a>(), <a href="qboxlayout.html#insertItem">insertItem</a>(), and <a href="qspaceritem.html">QSpacerItem</a>.</p>


<h3 class="fn"><a name="insertStretch" />QBoxLayout.insertStretch (<i>self</i>, int&#160;<i>index</i>, int&#160;<i>stretch</i>&#160;=&#160;0)</h3><p>Inserts a stretchable space (a <a href="qspaceritem.html">QSpacerItem</a>) at position <i>index</i>, with
zero minimum size and stretch factor <i>stretch</i>. If
<i>index</i> is negative the space is added at the end.</p>
<p><b>See also</b> <a href="qboxlayout.html#addStretch">addStretch</a>(), <a href="qboxlayout.html#insertItem">insertItem</a>(), and <a href="qspaceritem.html">QSpacerItem</a>.</p>


<h3 class="fn"><a name="insertWidget" />QBoxLayout.insertWidget (<i>self</i>, int&#160;<i>index</i>, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>, int&#160;<i>stretch</i>&#160;=&#160;0, <a href="qt-alignment.html">Qt.Alignment</a>&#160;<i>alignment</i>&#160;=&#160;0)</h3><p>The <i>widget</i> argument has it's ownership transferred to Qt.</p><p>Inserts <i>widget</i> at position <i>index</i>, with stretch
factor <i>stretch</i> and alignment <i>alignment</i>. If
<i>index</i> is negative, the widget is added at the end.</p>
<p>The stretch factor applies only in the <a href="qboxlayout.html#direction">direction</a> of the <a href="qboxlayout.html">QBoxLayout</a>, and is relative to the other
boxes and widgets in this <a href="qboxlayout.html">QBoxLayout</a>.
Widgets and boxes with higher stretch factors grow more.</p>
<p>If the stretch factor is 0 and nothing else in the <a href="qboxlayout.html">QBoxLayout</a> has a stretch factor greater than
zero, the space is distributed according to the <a href="qwidget.html">QWidget</a>:sizePolicy() of each widget that's
involved.</p>
<p>The alignment is specified by <i>alignment</i>. The default
alignment is 0, which means that the widget fills the entire
cell.</p>
<p><b>See also</b> <a href="qboxlayout.html#addWidget">addWidget</a>() and <a href="qboxlayout.html#insertItem">insertItem</a>().</p>


<h3 class="fn"><a name="invalidate" />QBoxLayout.invalidate (<i>self</i>)</h3><p>Reimplemented from <a href="qlayoutitem.html#invalidate">QLayoutItem.invalidate</a>().</p>
<p>Resets cached information.</p>


<h3 class="fn"><a name="itemAt" /><a href="qlayoutitem.html">QLayoutItem</a> QBoxLayout.itemAt (<i>self</i>, int)</h3><p>Reimplemented from <a href="qlayout.html#itemAt">QLayout.itemAt</a>().</p>


<h3 class="fn"><a name="maximumSize" /><a href="qsize.html">QSize</a> QBoxLayout.maximumSize (<i>self</i>)</h3><p>Reimplemented from <a href="qlayoutitem.html#maximumSize">QLayoutItem.maximumSize</a>().</p>


<h3 class="fn"><a name="minimumHeightForWidth" />int QBoxLayout.minimumHeightForWidth (<i>self</i>, int)</h3><p>Reimplemented from <a href="qlayoutitem.html#minimumHeightForWidth">QLayoutItem.minimumHeightForWidth</a>().</p>


<h3 class="fn"><a name="minimumSize" /><a href="qsize.html">QSize</a> QBoxLayout.minimumSize (<i>self</i>)</h3><p>Reimplemented from <a href="qlayoutitem.html#minimumSize">QLayoutItem.minimumSize</a>().</p>


<h3 class="fn"><a name="setDirection" />QBoxLayout.setDirection (<i>self</i>, <a href="qboxlayout.html#Direction-enum">Direction</a>)</h3><p>Sets the direction of this layout to <i>direction</i>.</p>
<p><b>See also</b> <a href="qboxlayout.html#direction">direction</a>().</p>


<h3 class="fn"><a name="setGeometry" />QBoxLayout.setGeometry (<i>self</i>, <a href="qrect.html">QRect</a>)</h3><p>Reimplemented from <a href="qlayoutitem.html#setGeometry">QLayoutItem.setGeometry</a>().</p>


<h3 class="fn"><a name="setSpacing" />QBoxLayout.setSpacing (<i>self</i>, int&#160;<i>spacing</i>)</h3><p>Reimplements <a href="qlayout.html#spacing-prop">QLayout.setSpacing</a>(). Sets the
spacing property to <i>spacing</i>.</p>
<p><b>See also</b> <a href="qlayout.html#spacing-prop">QLayout.setSpacing</a>() and <a href="qboxlayout.html#spacing">spacing</a>().</p>


<h3 class="fn"><a name="setStretch" />QBoxLayout.setStretch (<i>self</i>, int&#160;<i>index</i>, int&#160;<i>stretch</i>)</h3><p>Sets the stretch factor at position <i>index</i>. to
<i>stretch</i>.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qboxlayout.html#stretch">stretch</a>().</p>


<h3 class="fn"><a name="setStretchFactor" />bool QBoxLayout.setStretchFactor (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>w</i>, int&#160;<i>stretch</i>)</h3><p>Sets the stretch factor for <i>widget</i> to <i>stretch</i> and
returns true if <i>widget</i> is found in this layout (not
including child layouts); otherwise returns false.</p>
<p><b>See also</b> <a href="qlayout.html#setAlignment">setAlignment</a>().</p>


<h3 class="fn"><a name="setStretchFactor-2" />bool QBoxLayout.setStretchFactor (<i>self</i>, <a href="qlayout.html">QLayout</a>&#160;<i>l</i>, int&#160;<i>stretch</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the stretch factor for the layout <i>layout</i> to
<i>stretch</i> and returns true if <i>layout</i> is found in this
layout (not including child layouts); otherwise returns false.</p>


<h3 class="fn"><a name="sizeHint" /><a href="qsize.html">QSize</a> QBoxLayout.sizeHint (<i>self</i>)</h3><p>Reimplemented from <a href="qlayoutitem.html#sizeHint">QLayoutItem.sizeHint</a>().</p>


<h3 class="fn"><a name="spacing" />int QBoxLayout.spacing (<i>self</i>)</h3><p>Reimplements <a href="qlayout.html#spacing-prop">QLayout.spacing</a>(). If the spacing
property is valid, that value is returned. Otherwise, a value for
the spacing property is computed and returned. Since layout spacing
in a widget is style dependent, if the parent is a widget, it
queries the style for the (horizontal or vertical) spacing of the
layout. Otherwise, the parent is a layout, and it queries the
parent layout for the spacing().</p>
<p><b>See also</b> <a href="qlayout.html#spacing-prop">QLayout.spacing</a>() and <a href="qboxlayout.html#setSpacing">setSpacing</a>().</p>


<h3 class="fn"><a name="stretch" />int QBoxLayout.stretch (<i>self</i>, int&#160;<i>index</i>)</h3><p>Returns the stretch factor at position <i>index</i>.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qboxlayout.html#setStretch">setStretch</a>().</p>


<h3 class="fn"><a name="takeAt" /><a href="qlayoutitem.html">QLayoutItem</a> QBoxLayout.takeAt (<i>self</i>, int)</h3><p>The <i>QLayoutItem</i> result</p><p>Reimplemented from <a href="qlayout.html#takeAt">QLayout.takeAt</a>().</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.10.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.5</td></tr></table></div></address></body></html>