Sophie

Sophie

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

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>QSplitter 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">QSplitter Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QSplitter class implements a splitter widget. <a href="#details">More...</a></p>

<p>Inherits <a href="qframe.html">QFrame</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qsplitter.html#QSplitter">__init__</a></b> (<i>self</i>, QWidget&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qsplitter.html#QSplitter-2">__init__</a></b> (<i>self</i>, Qt.Orientation&#160;<i>orientation</i>, QWidget&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qsplitter.html#addWidget">addWidget</a></b> (<i>self</i>, QWidget&#160;<i>widget</i>)</li><li><div class="fn" /><b><a href="qsplitter.html#changeEvent">changeEvent</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" /><b><a href="qsplitter.html#childEvent">childEvent</a></b> (<i>self</i>, QChildEvent)</li><li><div class="fn" />bool <b><a href="qsplitter.html#childrenCollapsible">childrenCollapsible</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qsplitter.html#closestLegalPosition">closestLegalPosition</a></b> (<i>self</i>, int, int)</li><li><div class="fn" />int <b><a href="qsplitter.html#count">count</a></b> (<i>self</i>)</li><li><div class="fn" />QSplitterHandle <b><a href="qsplitter.html#createHandle">createHandle</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qsplitter.html#event">event</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" />(int, int) <b><a href="qsplitter.html#getRange">getRange</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />QSplitterHandle <b><a href="qsplitter.html#handle">handle</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />int <b><a href="qsplitter.html#handleWidth">handleWidth</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qsplitter.html#indexOf">indexOf</a></b> (<i>self</i>, QWidget&#160;<i>w</i>)</li><li><div class="fn" /><b><a href="qsplitter.html#insertWidget">insertWidget</a></b> (<i>self</i>, int&#160;<i>index</i>, QWidget&#160;<i>widget</i>)</li><li><div class="fn" />bool <b><a href="qsplitter.html#isCollapsible">isCollapsible</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />QSize <b><a href="qsplitter.html#minimumSizeHint">minimumSizeHint</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qsplitter.html#moveSplitter">moveSplitter</a></b> (<i>self</i>, int&#160;<i>pos</i>, int&#160;<i>index</i>)</li><li><div class="fn" />bool <b><a href="qsplitter.html#opaqueResize">opaqueResize</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.Orientation <b><a href="qsplitter.html#orientation">orientation</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qsplitter.html#refresh">refresh</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qsplitter.html#resizeEvent">resizeEvent</a></b> (<i>self</i>, QResizeEvent)</li><li><div class="fn" />bool <b><a href="qsplitter.html#restoreState">restoreState</a></b> (<i>self</i>, QByteArray&#160;<i>state</i>)</li><li><div class="fn" />QByteArray <b><a href="qsplitter.html#saveState">saveState</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qsplitter.html#setChildrenCollapsible">setChildrenCollapsible</a></b> (<i>self</i>, bool)</li><li><div class="fn" /><b><a href="qsplitter.html#setCollapsible">setCollapsible</a></b> (<i>self</i>, int&#160;<i>index</i>, bool)</li><li><div class="fn" /><b><a href="qsplitter.html#setHandleWidth">setHandleWidth</a></b> (<i>self</i>, int)</li><li><div class="fn" /><b><a href="qsplitter.html#setOpaqueResize">setOpaqueResize</a></b> (<i>self</i>, bool&#160;<i>opaque</i>&#160;=&#160;True)</li><li><div class="fn" /><b><a href="qsplitter.html#setOrientation">setOrientation</a></b> (<i>self</i>, Qt.Orientation)</li><li><div class="fn" /><b><a href="qsplitter.html#setRubberBand">setRubberBand</a></b> (<i>self</i>, int&#160;<i>position</i>)</li><li><div class="fn" /><b><a href="qsplitter.html#setSizes">setSizes</a></b> (<i>self</i>, list-of-int&#160;<i>list</i>)</li><li><div class="fn" /><b><a href="qsplitter.html#setStretchFactor">setStretchFactor</a></b> (<i>self</i>, int&#160;<i>index</i>, int&#160;<i>stretch</i>)</li><li><div class="fn" />QSize <b><a href="qsplitter.html#sizeHint">sizeHint</a></b> (<i>self</i>)</li><li><div class="fn" />list-of-int <b><a href="qsplitter.html#sizes">sizes</a></b> (<i>self</i>)</li><li><div class="fn" />QWidget <b><a href="qsplitter.html#widget">widget</a></b> (<i>self</i>, int&#160;<i>index</i>)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" /> <b><a href="qsplitter.html#__len__">__len__</a></b> (<i>self</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qsplitter.html#splitterMoved">splitterMoved</a></b> (int,int)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QSplitter class implements a splitter widget.</p>
<p>A splitter lets the user control the size of child widgets by
dragging the boundary between the children. Any number of widgets
may be controlled by a single splitter. The typical use of a
QSplitter is to create several widgets and add them using <a href="qsplitter.html#insertWidget">insertWidget</a>() or <a href="qsplitter.html#addWidget">addWidget</a>().</p>
<p>The following example will show a <a href="qlistview.html">QListView</a>, <a href="qtreeview.html">QTreeView</a>, and <a href="qtextedit.html">QTextEdit</a> side by side, with two splitter
handles:</p>
<pre class="cpp">
     <span class="type">QSplitter</span> <span class="operator">*</span>splitter <span class="operator">=</span> <span class="keyword">new</span> <span class="type">QSplitter</span>(parent);
     <span class="type"><a href="qlistview.html">QListView</a></span> <span class="operator">*</span>listview <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qlistview.html">QListView</a></span>;
     <span class="type"><a href="qtreeview.html">QTreeView</a></span> <span class="operator">*</span>treeview <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qtreeview.html">QTreeView</a></span>;
     <span class="type"><a href="qtextedit.html">QTextEdit</a></span> <span class="operator">*</span>textedit <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qtextedit.html">QTextEdit</a></span>;
     splitter<span class="operator">-</span><span class="operator">&gt;</span>addWidget(listview);
     splitter<span class="operator">-</span><span class="operator">&gt;</span>addWidget(treeview);
     splitter<span class="operator">-</span><span class="operator">&gt;</span>addWidget(textedit);
</pre>
<p>If a widget is already inside a QSplitter when <a href="qsplitter.html#insertWidget">insertWidget</a>() or <a href="qsplitter.html#addWidget">addWidget</a>() is called, it will move
to the new position. This can be used to reorder widgets in the
splitter later. You can use <a href="qsplitter.html#indexOf">indexOf</a>(), <a href="qsplitter.html#widget">widget</a>(), and <a href="qsplitter.html#count">count</a>() to get access to the widgets
inside the splitter.</p>
<p>A default QSplitter lays out its children horizontally (side by
side); you can use setOrientation(<a href="qt.html#Orientation-enum">Qt.Vertical</a>) to lay its children
out vertically.</p>
<p>By default, all widgets can be as large or as small as the user
wishes, between the <a href="qsplitter.html#minimumSizeHint">minimumSizeHint</a>() (or <a href="qwidget.html#minimumSize-prop">minimumSize</a>()) and <a href="qwidget.html#maximumSize-prop">maximumSize</a>() of the
widgets.</p>
<p>QSplitter resizes its children dynamically by default. If you
would rather have QSplitter resize the children only at the end of
a resize operation, call setOpaqueResize(false).</p>
<p>The initial distribution of size between the widgets is
determined by multiplying the initial size with the stretch factor.
You can also use <a href="qsplitter.html#setSizes">setSizes</a>()
to set the sizes of all the widgets. The function <a href="qsplitter.html#sizes">sizes</a>() returns the sizes set by the
user. Alternatively, you can save and restore the sizes of the
widgets from a <a href="qbytearray.html">QByteArray</a> using
<a href="qsplitter.html#saveState">saveState</a>() and <a href="qsplitter.html#restoreState">restoreState</a>() respectively.</p>
<p>When you <a href="qwidget.html#hide">hide</a>() a child its
space will be distributed among the other children. It will be
reinstated when you <a href="qwidget.html#show">show</a>() it
again.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QSplitter" />QSplitter.__init__ (<i>self</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 horizontal splitter with the <i>parent</i> argument
passed on to the <a href="qframe.html">QFrame</a> constructor.</p>
<p><b>See also</b> <a href="qsplitter.html#orientation-prop">setOrientation</a>().</p>


<h3 class="fn"><a name="QSplitter-2" />QSplitter.__init__ (<i>self</i>, <a href="qt.html#Orientation-enum">Qt.Orientation</a>&#160;<i>orientation</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 splitter with the given <i>orientation</i> and
<i>parent</i>.</p>
<p><b>See also</b> <a href="qsplitter.html#orientation-prop">setOrientation</a>().</p>


<h3 class="fn"><a name="addWidget" />QSplitter.addWidget (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>)</h3><p>The <i>widget</i> argument has it's ownership transferred to Qt.</p><p>Adds the given <i>widget</i> to the splitter's layout after all
the other items.</p>
<p>If <i>widget</i> is already in the splitter, it will be moved to
the new position.</p>
<p><b>See also</b> <a href="qsplitter.html#insertWidget">insertWidget</a>(), <a href="qsplitter.html#widget">widget</a>(), and <a href="qsplitter.html#indexOf">indexOf</a>().</p>


<h3 class="fn"><a name="changeEvent" />QSplitter.changeEvent (<i>self</i>, <a href="qevent.html">QEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#changeEvent">QWidget.changeEvent</a>().</p>


<h3 class="fn"><a name="childEvent" />QSplitter.childEvent (<i>self</i>, <a href="qchildevent.html">QChildEvent</a>)</h3><p>Reimplemented from <a href="qobject.html#childEvent">QObject.childEvent</a>().</p>
<p>Tells the splitter that the child widget described by <i>c</i>
has been inserted or removed.</p>
<p>This method is also used to handle the situation where a widget
is created with the splitter as a parent but not explicitly added
with <a href="qsplitter.html#insertWidget">insertWidget</a>() or
<a href="qsplitter.html#addWidget">addWidget</a>(). This is for
compatibility and not the recommended way of putting widgets into a
splitter in new code. Please use <a href="qsplitter.html#insertWidget">insertWidget</a>() or <a href="qsplitter.html#addWidget">addWidget</a>() in new code.</p>
<p><b>See also</b> <a href="qsplitter.html#addWidget">addWidget</a>() and <a href="qsplitter.html#insertWidget">insertWidget</a>().</p>


<h3 class="fn"><a name="childrenCollapsible" />bool QSplitter.childrenCollapsible (<i>self</i>)</h3><h3 class="fn"><a name="closestLegalPosition" />int QSplitter.closestLegalPosition (<i>self</i>, int, int)</h3><p>Returns the closest legal position to <i>pos</i> of the widget
with index <i>index</i>.</p>
<p>For right-to-left languages such as Arabic and Hebrew, the
layout of horizontal splitters is reversed. Positions are then
measured from the right edge of the widget.</p>
<p><b>See also</b> <a href="qsplitter.html#getRange">getRange</a>().</p>


<h3 class="fn"><a name="count" />int QSplitter.count (<i>self</i>)</h3><p>Returns the number of widgets contained in the splitter's
layout.</p>
<p><b>See also</b> <a href="qsplitter.html#widget">widget</a>() and
<a href="qsplitter.html#handle">handle</a>().</p>


<h3 class="fn"><a name="createHandle" /><a href="qsplitterhandle.html">QSplitterHandle</a> QSplitter.createHandle (<i>self</i>)</h3><p>Returns a new splitter handle as a child widget of this
splitter. This function can be reimplemented in subclasses to
provide support for custom handles.</p>
<p><b>See also</b> <a href="qsplitter.html#handle">handle</a>() and
<a href="qsplitter.html#indexOf">indexOf</a>().</p>


<h3 class="fn"><a name="event" />bool QSplitter.event (<i>self</i>, <a href="qevent.html">QEvent</a>)</h3><p>Reimplemented from <a href="qobject.html#event">QObject.event</a>().</p>


<h3 class="fn"><a name="getRange" />(int, int) QSplitter.getRange (<i>self</i>, int&#160;<i>index</i>)</h3><p>Returns the valid range of the splitter with index <i>index</i>
in *<i>min</i> and *<i>max</i> if <i>min</i> and <i>max</i> are not
0.</p>


<h3 class="fn"><a name="handle" /><a href="qsplitterhandle.html">QSplitterHandle</a> QSplitter.handle (<i>self</i>, int&#160;<i>index</i>)</h3><p>Returns the handle to the left (or above) for the item in the
splitter's layout at the given <i>index</i>. The handle at index 0
is always hidden.</p>
<p>For right-to-left languages such as Arabic and Hebrew, the
layout of horizontal splitters is reversed. The handle will be to
the right of the widget at <i>index</i>.</p>
<p><b>See also</b> <a href="qsplitter.html#count">count</a>(),
<a href="qsplitter.html#widget">widget</a>(), <a href="qsplitter.html#indexOf">indexOf</a>(), <a href="qsplitter.html#createHandle">createHandle</a>(), and <a href="qsplitter.html#handleWidth-prop">setHandleWidth</a>().</p>


<h3 class="fn"><a name="handleWidth" />int QSplitter.handleWidth (<i>self</i>)</h3><h3 class="fn"><a name="indexOf" />int QSplitter.indexOf (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>w</i>)</h3><p>Returns the index in the splitter's layout of the specified
<i>widget</i>. This also works for handles.</p>
<p>Handles are numbered from 0. There are as many handles as there
are child widgets, but the handle at position 0 is always
hidden.</p>
<p><b>See also</b> <a href="qsplitter.html#count">count</a>() and
<a href="qsplitter.html#widget">widget</a>().</p>


<h3 class="fn"><a name="insertWidget" />QSplitter.insertWidget (<i>self</i>, int&#160;<i>index</i>, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>)</h3><p>The <i>widget</i> argument has it's ownership transferred to Qt.</p><p>Inserts the <i>widget</i> specified into the splitter's layout
at the given <i>index</i>.</p>
<p>If <i>widget</i> is already in the splitter, it will be moved to
the new position.</p>
<p>if <i>index</i> is an invalid index, then the widget will be
inserted at the end.</p>
<p><b>See also</b> <a href="qsplitter.html#addWidget">addWidget</a>(), <a href="qsplitter.html#indexOf">indexOf</a>(), and <a href="qsplitter.html#widget">widget</a>().</p>


<h3 class="fn"><a name="isCollapsible" />bool QSplitter.isCollapsible (<i>self</i>, int&#160;<i>index</i>)</h3><p>Returns true if the widget at <i>index</i> is collapsible,
otherwise returns false</p>


<h3 class="fn"><a name="minimumSizeHint" /><a href="qsize.html">QSize</a> QSplitter.minimumSizeHint (<i>self</i>)</h3><p>Reimplemented from <a href="qwidget.html#minimumSizeHint-prop">QWidget.minimumSizeHint</a>().</p>


<h3 class="fn"><a name="moveSplitter" />QSplitter.moveSplitter (<i>self</i>, int&#160;<i>pos</i>, int&#160;<i>index</i>)</h3><p>Moves the left or top edge of the splitter handle at
<i>index</i> as close as possible to position <i>pos</i>, which is
the distance from the left or top edge of the widget.</p>
<p>For right-to-left languages such as Arabic and Hebrew, the
layout of horizontal splitters is reversed. <i>pos</i> is then the
distance from the right edge of the widget.</p>
<p><b>See also</b> <a href="qsplitter.html#splitterMoved">splitterMoved</a>(), <a href="qsplitter.html#closestLegalPosition">closestLegalPosition</a>(),
and <a href="qsplitter.html#getRange">getRange</a>().</p>


<h3 class="fn"><a name="opaqueResize" />bool QSplitter.opaqueResize (<i>self</i>)</h3><h3 class="fn"><a name="orientation" /><a href="qt.html#Orientation-enum">Qt.Orientation</a> QSplitter.orientation (<i>self</i>)</h3><h3 class="fn"><a name="refresh" />QSplitter.refresh (<i>self</i>)</h3><p>Updates the splitter's state. You should not need to call this
function.</p>


<h3 class="fn"><a name="resizeEvent" />QSplitter.resizeEvent (<i>self</i>, <a href="qresizeevent.html">QResizeEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget.resizeEvent</a>().</p>


<h3 class="fn"><a name="restoreState" />bool QSplitter.restoreState (<i>self</i>, <a href="qbytearray.html">QByteArray</a>&#160;<i>state</i>)</h3><p>Restores the splitter's layout to the <i>state</i> specified.
Returns true if the state is restored; otherwise returns false.</p>
<p>Typically this is used in conjunction with <a href="qsettings.html">QSettings</a> to restore the size from a past
session. Here is an example:</p>
<p>Restore the splitters's state:</p>
<pre class="cpp">
     <span class="type"><a href="qsettings.html">QSettings</a></span> settings;
     splitter<span class="operator">-</span><span class="operator">&gt;</span>restoreState(settings<span class="operator">.</span>value(<span class="string">"splitterSizes"</span>)<span class="operator">.</span>toByteArray());
</pre>
<p>A failure to restore the splitter's layout may result from
either invalid or out-of-date data in the supplied byte array.</p>
<p><b>See also</b> <a href="qsplitter.html#saveState">saveState</a>().</p>


<h3 class="fn"><a name="saveState" /><a href="qbytearray.html">QByteArray</a> QSplitter.saveState (<i>self</i>)</h3><p>Saves the state of the splitter's layout.</p>
<p>Typically this is used in conjunction with <a href="qsettings.html">QSettings</a> to remember the size for a future
session. A version number is stored as part of the data. Here is an
example:</p>
<pre class="cpp">
     <span class="type"><a href="qsettings.html">QSettings</a></span> settings;
     settings<span class="operator">.</span>setValue(<span class="string">"splitterSizes"</span><span class="operator">,</span> splitter<span class="operator">-</span><span class="operator">&gt;</span>saveState());
</pre>
<p><b>See also</b> <a href="qsplitter.html#restoreState">restoreState</a>().</p>


<h3 class="fn"><a name="setChildrenCollapsible" />QSplitter.setChildrenCollapsible (<i>self</i>, bool)</h3><h3 class="fn"><a name="setCollapsible" />QSplitter.setCollapsible (<i>self</i>, int&#160;<i>index</i>, bool)</h3><p>Sets whether the child widget at index <i>index</i> is
collapsible to <i>collapse</i>.</p>
<p>By default, children are collapsible, meaning that the user can
resize them down to size 0, even if they have a non-zero <a href="qwidget.html#minimumSize-prop">minimumSize</a>() or <a href="qsplitter.html#minimumSizeHint">minimumSizeHint</a>(). This
behavior can be changed on a per-widget basis by calling this
function, or globally for all the widgets in the splitter by
setting the <a href="qsplitter.html#childrenCollapsible-prop">childrenCollapsible</a>
property.</p>
<p><b>See also</b> <a href="qsplitter.html#isCollapsible">isCollapsible</a>() and <a href="qsplitter.html#childrenCollapsible-prop">childrenCollapsible</a>.</p>


<h3 class="fn"><a name="setHandleWidth" />QSplitter.setHandleWidth (<i>self</i>, int)</h3><h3 class="fn"><a name="setOpaqueResize" />QSplitter.setOpaqueResize (<i>self</i>, bool&#160;<i>opaque</i>&#160;=&#160;True)</h3><h3 class="fn"><a name="setOrientation" />QSplitter.setOrientation (<i>self</i>, <a href="qt.html#Orientation-enum">Qt.Orientation</a>)</h3><h3 class="fn"><a name="setRubberBand" />QSplitter.setRubberBand (<i>self</i>, int&#160;<i>position</i>)</h3><p>Displays a rubber band at position <i>pos</i>. If <i>pos</i> is
negative, the rubber band is removed.</p>


<h3 class="fn"><a name="setSizes" />QSplitter.setSizes (<i>self</i>, list-of-int&#160;<i>list</i>)</h3><p>Sets the child widgets respective sizes to the values given in
the <i>list</i>.</p>
<p>If the splitter is horizontal, the values set the widths of each
widget in pixels, from left to right. If the splitter is vertical,
the heights of each widget is set, from top to bottom.</p>
<p>Extra values in the <i>list</i> are ignored. If <i>list</i>
contains too few values, the result is undefined but the program
will still be well-behaved.</p>
<p>The overall size of the splitter widget is not affected.
Instead, any additional/missing space is distributed amongst the
widgets according to the relative weight of the sizes.</p>
<p>If you specify a size of 0, the widget will be invisible. The
size policies of the widgets are preserved. That is, a value
smaller then the minimal size hint of the respective widget will be
replaced by the value of the hint.</p>
<p><b>See also</b> <a href="qsplitter.html#sizes">sizes</a>().</p>


<h3 class="fn"><a name="setStretchFactor" />QSplitter.setStretchFactor (<i>self</i>, int&#160;<i>index</i>, int&#160;<i>stretch</i>)</h3><p>Updates the size policy of the widget at position <i>index</i>
to have a stretch factor of <i>stretch</i>.</p>
<p><i>stretch</i> is not the effective stretch factor; the
effective stretch factor is calculated by taking the initial size
of the widget and multiplying it with <i>stretch</i>.</p>
<p>This function is provided for convenience. It is equivalent
to</p>
<pre class="cpp">
 <span class="type"><a href="qwidget.html">QWidget</a></span> <span class="operator">*</span>widget <span class="operator">=</span> splitter<span class="operator">-</span><span class="operator">&gt;</span><a href="qsplitter.html#widget">widget</a>(index);
 <span class="type"><a href="qsizepolicy.html">QSizePolicy</a></span> policy <span class="operator">=</span> widget<span class="operator">-</span><span class="operator">&gt;</span><a href="qwidget.html#sizePolicy-prop">sizePolicy</a>();
 policy<span class="operator">.</span>setHorizontalStretch(stretch);
 policy<span class="operator">.</span>setVerticalStretch(stretch);
 widget<span class="operator">-</span><span class="operator">&gt;</span><a href="qwidget.html#sizePolicy-prop">setSizePolicy</a>(policy);
</pre>
<p><b>See also</b> <a href="qsplitter.html#setSizes">setSizes</a>()
and <a href="qsplitter.html#widget">widget</a>().</p>


<h3 class="fn"><a name="sizeHint" /><a href="qsize.html">QSize</a> QSplitter.sizeHint (<i>self</i>)</h3><p>Reimplemented from <a href="qwidget.html#sizeHint-prop">QWidget.sizeHint</a>().</p>


<h3 class="fn"><a name="sizes" />list-of-int QSplitter.sizes (<i>self</i>)</h3><p>Returns a list of the size parameters of all the widgets in this
splitter.</p>
<p>If the splitter's orientation is horizontal, the list contains
the widgets width in pixels, from left to right; if the orientation
is vertical, the list contains the widgets height in pixels, from
top to bottom.</p>
<p>Giving the values to another splitter's <a href="qsplitter.html#setSizes">setSizes</a>() function will produce a
splitter with the same layout as this one.</p>
<p>Note that invisible widgets have a size of 0.</p>
<p><b>See also</b> <a href="qsplitter.html#setSizes">setSizes</a>().</p>


<h3 class="fn"><a name="widget" /><a href="qwidget.html">QWidget</a> QSplitter.widget (<i>self</i>, int&#160;<i>index</i>)</h3><p>Returns the widget at the given <i>index</i> in the splitter's
layout.</p>
<p><b>See also</b> <a href="qsplitter.html#count">count</a>(),
<a href="qsplitter.html#handle">handle</a>(), <a href="qsplitter.html#indexOf">indexOf</a>(), and <a href="qsplitter.html#insertWidget">insertWidget</a>().</p>
<h3 class="fn"><a name="__len__" /> QSplitter.__len__ (<i>self</i>)</h3><hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="splitterMoved" />void splitterMoved (int,int)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the splitter handle at a particular
<i>index</i> has been moved to position <i>pos</i>.</p>
<p>For right-to-left languages such as Arabic and Hebrew, the
layout of horizontal splitters is reversed. <i>pos</i> is then the
distance from the right edge of the widget.</p>
<p><b>See also</b> <a href="qsplitter.html#moveSplitter">moveSplitter</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>