~ubuntu-branches/ubuntu/precise/python-qt4/precise-proposed

« back to all changes in this revision

Viewing changes to doc/html/qsplitter.html

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell, Jonathan Riddell
  • Date: 2010-11-08 16:13:33 UTC
  • mfrom: (1.5.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20101108161333-0nec4wu0nz3wpf9r
Tags: 4.8.1-0ubuntu1
[ Jonathan Riddell ]
* New upstream release
* Build against python-sip-dev 4.11.2
* Remove kubuntu_02_fix-scpk-and-flag-issue.diff merged upstream
* Install __init__.py into /usr/lib/python3.2/dist-packages/PyQt4,
  fixes Python 3 support
* Add QtDeclarative to python-qt4
* Add kubuntu_03_uiparser.diff from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
tr.address { font-family: sans-serif }
8
8
body { background: #ffffff; color: black; }
9
9
</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="../pyqt4ref.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>
 
10
 
10
11
<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, 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)</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)</li><li><div class="fn" />QSplitterHandle <b><a href="qsplitter.html#handle">handle</a></b> (<i>self</i>, int)</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)</li><li><div class="fn" /><b><a href="qsplitter.html#insertWidget">insertWidget</a></b> (<i>self</i>, int, QWidget)</li><li><div class="fn" />bool <b><a href="qsplitter.html#isCollapsible">isCollapsible</a></b> (<i>self</i>, int)</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, int)</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)</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, 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)</li><li><div class="fn" /><b><a href="qsplitter.html#setSizes">setSizes</a></b> (<i>self</i>, list-of-int)</li><li><div class="fn" /><b><a href="qsplitter.html#setStretchFactor">setStretchFactor</a></b> (<i>self</i>, int, int)</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)</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>
11
 
<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>
12
 
<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>
13
 
<pre>     QSplitter *splitter = new QSplitter(parent);
 
12
<p>A splitter lets the user control the size of child widgets by
 
13
dragging the boundary between the children. Any number of widgets
 
14
may be controlled by a single splitter. The typical use of a
 
15
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>
 
16
<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
 
17
handles:</p>
 
18
<pre class="highlightedCode brush: cpp">
 
19
     QSplitter *splitter = new QSplitter(parent);
14
20
     QListView *listview = new QListView;
15
21
     QTreeView *treeview = new QTreeView;
16
22
     QTextEdit *textedit = new QTextEdit;
17
23
     splitter-&gt;addWidget(listview);
18
24
     splitter-&gt;addWidget(treeview);
19
 
     splitter-&gt;addWidget(textedit);</pre>
20
 
<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>
21
 
<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>
22
 
<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>
23
 
<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>
24
 
<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>
25
 
<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>
26
 
<p>See also <a href="qsplitterhandle.html">QSplitterHandle</a>, <a href="qhboxlayout.html">QHBoxLayout</a>, <a href="qvboxlayout.html">QVBoxLayout</a>, and <a href="qtabwidget.html">QTabWidget</a>.</p>
27
 
<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> arguments is passed on to the <a href="qframe.html">QFrame</a> constructor.</p>
28
 
<p>See also <a href="qsplitter.html#orientation-prop">setOrientation</a>().</p>
29
 
<h3 class="fn"><a name="QSplitter-2" />QSplitter.__init__ (<i>self</i>, <a href="qt.html#Orientation-enum">Qt.Orientation</a>, <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>
30
 
<p>See also <a href="qsplitter.html#orientation-prop">setOrientation</a>().</p>
31
 
<a name="//apple_ref/cpp/instm/QSplitter/~QSplitter" />
32
 
<h3 class="fn"><a name="addWidget" />QSplitter.addWidget (<i>self</i>, <a href="qwidget.html">QWidget</a>)</h3><p>The <i>QWidget</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>
33
 
<p>If <i>widget</i> is already in the splitter, it will be moved to the new position.</p>
 
25
     splitter-&gt;addWidget(textedit);
 
26
</pre>
 
27
<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
 
28
to the new position. This can be used to reorder widgets in the
 
29
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
 
30
inside the splitter.</p>
 
31
<p>A default QSplitter lays out its children horizontally (side by
 
32
side); you can use setOrientation(<a href="qt.html#Orientation-enum">Qt.Vertical</a>) to lay its children
 
33
out vertically.</p>
 
34
<p>By default, all widgets can be as large or as small as the user
 
35
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
 
36
widgets.</p>
 
37
<p>QSplitter resizes its children dynamically by default. If you
 
38
would rather have QSplitter resize the children only at the end of
 
39
a resize operation, call setOpaqueResize(false).</p>
 
40
<p>The initial distribution of size between the widgets is
 
41
determined by multiplying the initial size with the stretch factor.
 
42
You can also use <a href="qsplitter.html#setSizes">setSizes</a>()
 
43
to set the sizes of all the widgets. The function <a href="qsplitter.html#sizes">sizes</a>() returns the sizes set by the
 
44
user. Alternatively, you can save and restore the sizes of the
 
45
widgets from a <a href="qbytearray.html">QByteArray</a> using
 
46
<a href="qsplitter.html#saveState">saveState</a>() and <a href="qsplitter.html#restoreState">restoreState</a>() respectively.</p>
 
47
<p>When you <a href="qwidget.html#hide">hide</a>() a child its
 
48
space will be distributed among the other children. It will be
 
49
reinstated when you <a href="qwidget.html#show">show</a>() it
 
50
again.</p>
 
51
<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>
 
52
arguments is passed on to the <a href="qframe.html">QFrame</a>
 
53
constructor.</p>
 
54
<p>See also <a href="qsplitter.html#orientation-prop">setOrientation</a>().</p>
 
55
 
 
56
 
 
57
<h3 class="fn"><a name="QSplitter-2" />QSplitter.__init__ (<i>self</i>, <a href="qt.html#Orientation-enum">Qt.Orientation</a>, <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
 
58
<i>parent</i>.</p>
 
59
<p>See also <a href="qsplitter.html#orientation-prop">setOrientation</a>().</p>
 
60
 
 
61
 
 
62
<h3 class="fn"><a name="addWidget" />QSplitter.addWidget (<i>self</i>, <a href="qwidget.html">QWidget</a>)</h3><p>The <i>QWidget</i> argument has it's ownership transferred to Qt.</p><p>Adds the given <i>widget</i> to the splitter's layout after all
 
63
the other items.</p>
 
64
<p>If <i>widget</i> is already in the splitter, it will be moved to
 
65
the new position.</p>
34
66
<p>See also <a href="qsplitter.html#insertWidget">insertWidget</a>(), <a href="qsplitter.html#widget">widget</a>(), and <a href="qsplitter.html#indexOf">indexOf</a>().</p>
35
 
<a name="//apple_ref/cpp/instm/QSplitter/changeEvent" />
 
67
 
 
68
 
36
69
<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>
37
 
<a name="//apple_ref/cpp/instm/QSplitter/childEvent" />
 
70
 
 
71
 
38
72
<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>
39
 
<p>Tells the splitter that the child widget described by <i>c</i> has been inserted or removed.</p>
40
 
<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>
41
 
<p>See also <a href="qsplitter.html#addWidget">addWidget</a>() and <a href="qsplitter.html#insertWidget">insertWidget</a>().</p>
42
 
<a name="//apple_ref/cpp/instm/QSplitter/closestLegalPosition" />
43
 
<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>
44
 
<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>
 
73
<p>Tells the splitter that the child widget described by <i>c</i>
 
74
has been inserted or removed.</p>
 
75
<p>This method is also used to handle the situation where a widget
 
76
is created with the splitter as a parent but not explicitly added
 
77
with <a href="qsplitter.html#insertWidget">insertWidget</a>() or
 
78
<a href="qsplitter.html#addWidget">addWidget</a>(). This is for
 
79
compatibility and not the recommended way of putting widgets into a
 
80
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>
 
81
<p>See also <a href="qsplitter.html#addWidget">addWidget</a>() and
 
82
<a href="qsplitter.html#insertWidget">insertWidget</a>().</p>
 
83
 
 
84
 
 
85
<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
 
86
with index <i>index</i>.</p>
 
87
<p>For right-to-left languages such as Arabic and Hebrew, the
 
88
layout of horizontal splitters is reversed. Positions are then
 
89
measured from the right edge of the widget.</p>
45
90
<p>See also <a href="qsplitter.html#getRange">getRange</a>().</p>
46
 
<a name="//apple_ref/cpp/instm/QSplitter/count" />
47
 
<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>
48
 
<p>See also <a href="qsplitter.html#widget">widget</a>() and <a href="qsplitter.html#handle">handle</a>().</p>
49
 
<a name="//apple_ref/cpp/instm/QSplitter/createHandle" />
50
 
<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>
51
 
<p>See also <a href="qsplitter.html#handle">handle</a>() and <a href="qsplitter.html#indexOf">indexOf</a>().</p>
52
 
<a name="//apple_ref/cpp/instm/QSplitter/event" />
 
91
 
 
92
 
 
93
<h3 class="fn"><a name="count" />int QSplitter.count (<i>self</i>)</h3><p>Returns the number of widgets contained in the splitter's
 
94
layout.</p>
 
95
<p>See also <a href="qsplitter.html#widget">widget</a>() and
 
96
<a href="qsplitter.html#handle">handle</a>().</p>
 
97
 
 
98
 
 
99
<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
 
100
splitter. This function can be reimplemented in subclasses to
 
101
provide support for custom handles.</p>
 
102
<p>See also <a href="qsplitter.html#handle">handle</a>() and
 
103
<a href="qsplitter.html#indexOf">indexOf</a>().</p>
 
104
 
 
105
 
53
106
<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>
54
 
<a name="//apple_ref/cpp/instm/QSplitter/getRange" />
55
 
<h3 class="fn"><a name="getRange" />(int, int) QSplitter.getRange (<i>self</i>, int)</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>
56
 
<a name="//apple_ref/cpp/instm/QSplitter/handle" />
57
 
<h3 class="fn"><a name="handle" /><a href="qsplitterhandle.html">QSplitterHandle</a> QSplitter.handle (<i>self</i>, int)</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>
58
 
<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>
 
107
 
 
108
 
 
109
<h3 class="fn"><a name="getRange" />(int, int) QSplitter.getRange (<i>self</i>, int)</h3><p>Returns the valid range of the splitter with index <i>index</i>
 
110
in *<i>min</i> and *<i>max</i> if <i>min</i> and <i>max</i> are not
 
111
0.</p>
 
112
 
 
113
 
 
114
<h3 class="fn"><a name="handle" /><a href="qsplitterhandle.html">QSplitterHandle</a> QSplitter.handle (<i>self</i>, int)</h3><p>Returns the handle to the left (or above) for the item in the
 
115
splitter's layout at the given <i>index</i>. The handle at index 0
 
116
is always hidden.</p>
 
117
<p>For right-to-left languages such as Arabic and Hebrew, the
 
118
layout of horizontal splitters is reversed. The handle will be to
 
119
the right of the widget at <i>index</i>.</p>
59
120
<p>See also <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>
60
 
<a name="//apple_ref/cpp/instm/QSplitter/indexOf" />
61
 
<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>)</h3><p>Returns the index in the splitter's layout of the specified <i>widget</i>. This also works for handles.</p>
62
 
<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>
 
121
 
 
122
 
 
123
<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>)</h3><p>Returns the index in the splitter's layout of the specified
 
124
<i>widget</i>. This also works for handles.</p>
 
125
<p>Handles are numbered from 0. There are as many handles as there
 
126
are child widgets, but the handle at position 0 is always
 
127
hidden.</p>
63
128
<p>See also <a href="qsplitter.html#count">count</a>() and <a href="qsplitter.html#widget">widget</a>().</p>
64
 
<a name="//apple_ref/cpp/instm/QSplitter/insertWidget" />
65
 
<h3 class="fn"><a name="insertWidget" />QSplitter.insertWidget (<i>self</i>, int, <a href="qwidget.html">QWidget</a>)</h3><p>The <i>QWidget</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>
66
 
<p>If <i>widget</i> is already in the splitter, it will be moved to the new position.</p>
67
 
<p>if <i>index</i> is an invalid index, then the widget will be inserted at the end.</p>
68
 
<p>See also <a href="qsplitter.html#addWidget">addWidget</a>(), <a href="qsplitter.html#indexOf">indexOf</a>(), and <a href="qsplitter.html#widget">widget</a>().</p>
69
 
<a name="//apple_ref/cpp/instm/QSplitter/isCollapsible" />
70
 
<h3 class="fn"><a name="isCollapsible" />bool QSplitter.isCollapsible (<i>self</i>, int)</h3><p>Returns true if the widget at <i>index</i> is collapsible, otherwise returns false</p>
71
 
<a name="//apple_ref/cpp/instm/QSplitter/minimumSizeHint" />
 
129
 
 
130
 
 
131
<h3 class="fn"><a name="insertWidget" />QSplitter.insertWidget (<i>self</i>, int, <a href="qwidget.html">QWidget</a>)</h3><p>The <i>QWidget</i> argument has it's ownership transferred to Qt.</p><p>Inserts the <i>widget</i> specified into the splitter's layout
 
132
at the given <i>index</i>.</p>
 
133
<p>If <i>widget</i> is already in the splitter, it will be moved to
 
134
the new position.</p>
 
135
<p>if <i>index</i> is an invalid index, then the widget will be
 
136
inserted at the end.</p>
 
137
<p>See also <a href="qsplitter.html#addWidget">addWidget</a>(),
 
138
<a href="qsplitter.html#indexOf">indexOf</a>(), and <a href="qsplitter.html#widget">widget</a>().</p>
 
139
 
 
140
 
 
141
<h3 class="fn"><a name="isCollapsible" />bool QSplitter.isCollapsible (<i>self</i>, int)</h3><p>Returns true if the widget at <i>index</i> is collapsible,
 
142
otherwise returns false</p>
 
143
 
 
144
 
72
145
<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>
73
 
<a name="//apple_ref/cpp/instm/QSplitter/moveSplitter" />
74
 
<h3 class="fn"><a name="moveSplitter" />QSplitter.moveSplitter (<i>self</i>, int, int)</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>
75
 
<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>
76
 
<p>See also <a href="qsplitter.html#splitterMoved">splitterMoved</a>(), <a href="qsplitter.html#closestLegalPosition">closestLegalPosition</a>(), and <a href="qsplitter.html#getRange">getRange</a>().</p>
77
 
<a name="//apple_ref/cpp/instm/QSplitter/refresh" />
78
 
<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>
79
 
<a name="//apple_ref/cpp/instm/QSplitter/resizeEvent" />
 
146
 
 
147
 
 
148
<h3 class="fn"><a name="moveSplitter" />QSplitter.moveSplitter (<i>self</i>, int, int)</h3><p>Moves the left or top edge of the splitter handle at
 
149
<i>index</i> as close as possible to position <i>pos</i>, which is
 
150
the distance from the left or top edge of the widget.</p>
 
151
<p>For right-to-left languages such as Arabic and Hebrew, the
 
152
layout of horizontal splitters is reversed. <i>pos</i> is then the
 
153
distance from the right edge of the widget.</p>
 
154
<p>See also <a href="qsplitter.html#splitterMoved">splitterMoved</a>(), <a href="qsplitter.html#closestLegalPosition">closestLegalPosition</a>(),
 
155
and <a href="qsplitter.html#getRange">getRange</a>().</p>
 
156
 
 
157
 
 
158
<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
 
159
function.</p>
 
160
 
 
161
 
80
162
<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>
81
 
<a name="//apple_ref/cpp/instm/QSplitter/restoreState" />
82
 
<h3 class="fn"><a name="restoreState" />bool QSplitter.restoreState (<i>self</i>, <a href="qbytearray.html">QByteArray</a>)</h3><p>Restores the splitter's layout to the <i>state</i> specified. Returns true if the state is restored; otherwise returns false.</p>
83
 
<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>
 
163
 
 
164
 
 
165
<h3 class="fn"><a name="restoreState" />bool QSplitter.restoreState (<i>self</i>, <a href="qbytearray.html">QByteArray</a>)</h3><p>Restores the splitter's layout to the <i>state</i> specified.
 
166
Returns true if the state is restored; otherwise returns false.</p>
 
167
<p>Typically this is used in conjunction with <a href="qsettings.html">QSettings</a> to restore the size from a past
 
168
session. Here is an example:</p>
84
169
<p>Restore the splitters's state:</p>
85
 
<pre>     QSettings settings;
86
 
     splitter-&gt;restoreState(settings.value("splitterSizes").toByteArray());</pre>
87
 
<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>
 
170
<pre class="highlightedCode brush: cpp">
 
171
     QSettings settings;
 
172
     splitter-&gt;restoreState(settings.value("splitterSizes").toByteArray());
 
173
</pre>
 
174
<p>A failure to restore the splitter's layout may result from
 
175
either invalid or out-of-date data in the supplied byte array.</p>
88
176
<p>See also <a href="qsplitter.html#saveState">saveState</a>().</p>
89
 
<a name="//apple_ref/cpp/instm/QSplitter/saveState" />
 
177
 
 
178
 
90
179
<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>
91
 
<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>
92
 
<pre>     QSettings settings;
93
 
     settings.setValue("splitterSizes", splitter-&gt;saveState());</pre>
 
180
<p>Typically this is used in conjunction with <a href="qsettings.html">QSettings</a> to remember the size for a future
 
181
session. A version number is stored as part of the data. Here is an
 
182
example:</p>
 
183
<pre class="highlightedCode brush: cpp">
 
184
     QSettings settings;
 
185
     settings.setValue("splitterSizes", splitter-&gt;saveState());
 
186
</pre>
94
187
<p>See also <a href="qsplitter.html#restoreState">restoreState</a>().</p>
95
 
<a name="//apple_ref/cpp/instm/QSplitter/setCollapsible" />
96
 
<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, bool)</h3><p>Sets whether the child widget at index <i>index</i> is collapsible to <i>collapse</i>.</p>
97
 
<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>
 
188
 
 
189
 
 
190
<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, bool)</h3><p>Sets whether the child widget at index <i>index</i> is
 
191
collapsible to <i>collapse</i>.</p>
 
192
<p>By default, children are collapsible, meaning that the user can
 
193
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
 
194
behavior can be changed on a per-widget basis by calling this
 
195
function, or globally for all the widgets in the splitter by
 
196
setting the <a href="qsplitter.html#childrenCollapsible-prop">childrenCollapsible</a>
 
197
property.</p>
98
198
<p>See also <a href="qsplitter.html#isCollapsible">isCollapsible</a>() and <a href="qsplitter.html#childrenCollapsible-prop">childrenCollapsible</a>.</p>
99
 
<a name="//apple_ref/cpp/instm/QSplitter/setRubberBand" />
100
 
<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)</h3><p>Displays a rubber band at position <i>pos</i>. If <i>pos</i> is negative, the rubber band is removed.</p>
101
 
<a name="//apple_ref/cpp/instm/QSplitter/setSizes" />
102
 
<h3 class="fn"><a name="setSizes" />QSplitter.setSizes (<i>self</i>, list-of-int)</h3><p>Sets the child widgets respective sizes to the values given in the <i>list</i>.</p>
103
 
<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>
104
 
<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>
105
 
<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>
106
 
<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>
 
199
 
 
200
 
 
201
<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)</h3><p>Displays a rubber band at position <i>pos</i>. If <i>pos</i> is
 
202
negative, the rubber band is removed.</p>
 
203
 
 
204
 
 
205
<h3 class="fn"><a name="setSizes" />QSplitter.setSizes (<i>self</i>, list-of-int)</h3><p>Sets the child widgets respective sizes to the values given in
 
206
the <i>list</i>.</p>
 
207
<p>If the splitter is horizontal, the values set the widths of each
 
208
widget in pixels, from left to right. If the splitter is vertical,
 
209
the heights of each widget is set, from top to bottom.</p>
 
210
<p>Extra values in the <i>list</i> are ignored. If <i>list</i>
 
211
contains too few values, the result is undefined but the program
 
212
will still be well-behaved.</p>
 
213
<p>The overall size of the splitter widget is not affected.
 
214
Instead, any additional/missing space is distributed amongst the
 
215
widgets according to the relative weight of the sizes.</p>
 
216
<p>If you specify a size of 0, the widget will be invisible. The
 
217
size policies of the widgets are preserved. That is, a value
 
218
smaller then the minimal size hint of the respective widget will be
 
219
replaced by the value of the hint.</p>
107
220
<p>See also <a href="qsplitter.html#sizes">sizes</a>().</p>
108
 
<a name="//apple_ref/cpp/instm/QSplitter/setStretchFactor" />
109
 
<h3 class="fn"><a name="setStretchFactor" />QSplitter.setStretchFactor (<i>self</i>, int, int)</h3><p>Updates the size policy of the widget at position <i>index</i> to have a stretch factor of <i>stretch</i>.</p>
110
 
<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>
111
 
<p>This function is provided for convenience. It is equivalent to</p>
112
 
<pre> QWidget *widget = splitter-&gt;widget(index);
 
221
 
 
222
 
 
223
<h3 class="fn"><a name="setStretchFactor" />QSplitter.setStretchFactor (<i>self</i>, int, int)</h3><p>Updates the size policy of the widget at position <i>index</i>
 
224
to have a stretch factor of <i>stretch</i>.</p>
 
225
<p><i>stretch</i> is not the effective stretch factor; the
 
226
effective stretch factor is calculated by taking the initial size
 
227
of the widget and multiplying it with <i>stretch</i>.</p>
 
228
<p>This function is provided for convenience. It is equivalent
 
229
to</p>
 
230
<pre class="highlightedCode brush: cpp">
 
231
 QWidget *widget = splitter-&gt;widget(index);
113
232
 QSizePolicy policy = widget-&gt;sizePolicy();
114
233
 policy.setHorizontalStretch(stretch);
115
234
 policy.setVerticalStretch(stretch);
116
 
 widget-&gt;setSizePolicy(policy);</pre>
117
 
<p>See also <a href="qsplitter.html#setSizes">setSizes</a>() and <a href="qsplitter.html#widget">widget</a>().</p>
118
 
<a name="//apple_ref/cpp/instm/QSplitter/sizeHint" />
 
235
 widget-&gt;setSizePolicy(policy);
 
236
</pre>
 
237
<p>See also <a href="qsplitter.html#setSizes">setSizes</a>() and
 
238
<a href="qsplitter.html#widget">widget</a>().</p>
 
239
 
 
240
 
119
241
<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>
120
 
<a name="//apple_ref/cpp/instm/QSplitter/sizes" />
121
 
<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>
122
 
<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>
123
 
<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>
 
242
 
 
243
 
 
244
<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
 
245
splitter.</p>
 
246
<p>If the splitter's orientation is horizontal, the list contains
 
247
the widgets width in pixels, from left to right; if the orientation
 
248
is vertical, the list contains the widgets height in pixels, from
 
249
top to bottom.</p>
 
250
<p>Giving the values to another splitter's <a href="qsplitter.html#setSizes">setSizes</a>() function will produce a
 
251
splitter with the same layout as this one.</p>
124
252
<p>Note that invisible widgets have a size of 0.</p>
125
253
<p>See also <a href="qsplitter.html#setSizes">setSizes</a>().</p>
126
 
<a name="//apple_ref/cpp/instm/QSplitter/splitterMoved" />
127
 
<h3 class="fn"><a name="widget" /><a href="qwidget.html">QWidget</a> QSplitter.widget (<i>self</i>, int)</h3><p>Returns the widget at the given <i>index</i> in the splitter's layout.</p>
 
254
 
 
255
 
 
256
<h3 class="fn"><a name="widget" /><a href="qwidget.html">QWidget</a> QSplitter.widget (<i>self</i>, int)</h3><p>Returns the widget at the given <i>index</i> in the splitter's
 
257
layout.</p>
128
258
<p>See also <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>
129
 
<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>
130
 
<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>
 
259
<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
 
260
<i>index</i> has been moved to position <i>pos</i>.</p>
 
261
<p>For right-to-left languages such as Arabic and Hebrew, the
 
262
layout of horizontal splitters is reversed. <i>pos</i> is then the
 
263
distance from the right edge of the widget.</p>
131
264
<p>See also <a href="qsplitter.html#moveSplitter">moveSplitter</a>().</p>
132
 
<a name="//apple_ref/cpp/instm/QSplitter/widget" />
133
 
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.7.7 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> 2010</td><td align="right" width="25%">Qt&#160;4.6.3</td></tr></table></div></address></body></html>
 
 
b'\\ No newline at end of file'
 
265
 
 
266
 
 
267
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.8.1 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> 2010</td><td align="right" width="25%">Qt&#160;4.7.0</td></tr></table></div></address></body></html>
 
 
b'\\ No newline at end of file'