qsplitter.html
来自「QT 下载资料仅供参考」· HTML 代码 · 共 266 行 · 第 1/2 页
HTML
266 行
</h3>Returns the closest legal position to <em>p</em> of the splitter with id <em>id</em>.<p> <p>See also <a href="#idAfter">idAfter</a>().<h3 class=fn>void <a name="childEvent"></a>QSplitter::childEvent ( <a href="qchildevent.html">QChildEvent</a> * c )<tt> [virtual protected]</tt></h3>Tells the splitter that a child widget has been inserted or removed.The event is passed in <em>c</em>.<p>Reimplemented from <a href="qobject.html#childEvent">QObject</a>.<h3 class=fn>void <a name="drawSplitter"></a>QSplitter::drawSplitter ( <a href="qpainter.html">QPainter</a> * p, QCOORD x, QCOORD y, QCOORD w, QCOORD h )<tt> [virtual protected]</tt></h3><b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.<p> Draws the splitter handle in the rectangle described by <em>x</em>, <em>y</em>,<em>w</em>, <em>h</em> using painter <em>p</em>.<p>See also <a href="qstyle.html#drawPrimitive">QStyle::drawPrimitive</a>().<h3 class=fn>void <a name="getRange"></a>QSplitter::getRange ( int id, int * min, int * max )<tt> [protected]</tt></h3>Returns the valid range of the splitter with id <em>id</em> in <em>*min</em> and <em>*max</em>.<p> <p>See also <a href="#idAfter">idAfter</a>().<h3 class=fn>int <a name="idAfter"></a>QSplitter::idAfter ( <a href="qwidget.html">QWidget</a> * w ) const<tt> [protected]</tt></h3>Returns the id of the splitter to the right of or below the widget <em>w</em>,or 0 if there is no such splitter(i.e. it is either not in this QSplitter or it is at the end).<h3 class=fn>void <a name="moveSplitter"></a>QSplitter::moveSplitter ( QCOORD p, int id )<tt> [protected]</tt></h3>Moves the left/top edge of the splitter handle with id <em>id</em> asclose as possible to position <em>p</em>, which is the distance from theleft (or top) edge of the widget.<p> For Arabic and Hebrew the layout is reversed, and using thisfunction to set the position of the splitter might lead tounexpected results, since in Arabic and Hebrew the position ofsplitter one is to the left of the position of splitter zero.<p> <p>See also <a href="#idAfter">idAfter</a>().<h3 class=fn>void <a name="moveToFirst"></a>QSplitter::moveToFirst ( <a href="qwidget.html">QWidget</a> * w )</h3>Moves widget <em>w</em> to the leftmost/top position.<p>Example: <a href="splitter-example.html#x1237">splitter/splitter.cpp</a>.<h3 class=fn>void <a name="moveToLast"></a>QSplitter::moveToLast ( <a href="qwidget.html">QWidget</a> * w )</h3>Moves widget <em>w</em> to the rightmost/bottom position.<h3 class=fn>bool <a name="opaqueResize"></a>QSplitter::opaqueResize () const</h3>Returns TRUE if opaque resize is on; otherwise returns FALSE.<p> <p>See also <a href="#setOpaqueResize">setOpaqueResize</a>().<h3 class=fn><a href="qt.html#Orientation-enum">Orientation</a> <a name="orientation"></a>QSplitter::orientation () const</h3><p>Returns the orientation of the splitter.See the <a href="qsplitter.html#orientation-prop">"orientation"</a> property for details.<h3 class=fn>void <a name="refresh"></a>QSplitter::refresh ()</h3><p> Updates the splitter's state. You should not need to call thisfunction.<h3 class=fn>void <a name="setOpaqueResize"></a>QSplitter::setOpaqueResize ( bool on = TRUE )<tt> [virtual]</tt></h3>If <em>on</em> is TRUE then opaque resizing is turned on; otherwiseopaque resizing is turned off.Opaque resizing is initially turned off.<p> <p>See also <a href="#opaqueResize">opaqueResize</a>().<p>Examples: <a href="mainlyQt-editor-example.html#x2563">mainlyQt/editor.cpp</a> and <a href="splitter-example.html#x1238">splitter/splitter.cpp</a>.<h3 class=fn>void <a name="setOrientation"></a>QSplitter::setOrientation ( <a href="qt.html#Orientation-enum">Orientation</a> )<tt> [virtual]</tt></h3><p>Sets the orientation of the splitter.See the <a href="qsplitter.html#orientation-prop">"orientation"</a> property for details.<h3 class=fn>void <a name="setResizeMode"></a>QSplitter::setResizeMode ( <a href="qwidget.html">QWidget</a> * w, <a href="qsplitter.html#ResizeMode-enum">ResizeMode</a> mode )<tt> [virtual]</tt></h3>Sets resize mode of <em>w</em> to <em>mode</em>.<p> <p>See also <a href="#ResizeMode-enum">ResizeMode</a>.<p>Examples: <a href="fileiconview-example.html#x890">fileiconview/mainwindow.cpp</a>, <a href="listviews-example.html#x348">listviews/listviews.cpp</a>, <a href="ftpclient-example.html#x678">network/ftpclient/ftpmainwindow.cpp</a> and <a href="splitter-example.html#x1239">splitter/splitter.cpp</a>.<h3 class=fn>void <a name="setRubberband"></a>QSplitter::setRubberband ( int p )<tt> [virtual protected]</tt></h3>Shows a rubber band at position <em>p</em>. If <em>p</em> is negative, therubber band is removed.<h3 class=fn>void <a name="setSizes"></a>QSplitter::setSizes ( <a href="qvaluelist.html">QValueList</a><int> list )</h3>Sets the size parameters to the values given in <em>list</em>.If the splitter is horizontal, the values set the sizes fromleft to right. If it is vertical, the sizes are applied fromtop to bottom.Extra values in <em>list</em> are ignored.<p> If <em>list</em> contains too few values, the result is undefinedbut the program will still be well-behaved.<p> <p>See also <a href="#sizes">sizes</a>().<h3 class=fn><a href="qvaluelist.html">QValueList</a><int> <a name="sizes"></a>QSplitter::sizes () const</h3>Returns a list of the size parameters of all the widgets in thissplitter.<p> Giving the values to another splitter's <a href="#setSizes">setSizes</a>() function willproduce a splitter with the same layout as this one.<p> Note that if you want to iterate over the list, you shoulditerate over a copy, e.g.<pre> <a href="qvaluelist.html">QValueList</a><int> list = mySplitter.sizes(); QValueList<int>::Iterator it = list.<a href="qvaluelist.html#begin">begin</a>(); while( it != list.<a href="qvaluelist.html#end">end</a>() ) { myProcessing( *it ); ++it; } </pre> <p> <p>See also <a href="#setSizes">setSizes</a>().<hr><h2>Property Documentation</h2><h3 class=fn><a href="qt.html#Orientation-enum">Orientation</a> <a name="orientation-prop"></a>orientation</h3><p>This property holds the orientation of the splitter.<p>By default the orientation is horizontal (the widgets are side by side).The possible orientations are Qt:Vertical and Qt::Horizontal (the default).<p> <p>Set this property's value with <a href="#setOrientation">setOrientation</a>() and get this property's value with <a href="#orientation">orientation</a>().<!-- eof --><hr><p>This file is part of the <a href="index.html">Qt toolkit</a>.Copyright © 1995-2002<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center><table width=100% cellspacing=0 border=0><tr><td>Copyright © 2002 <a href="http://www.trolltech.com">Trolltech</a><td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a><td align=right><div align=right>Qt version 3.0.5</div></table></div></address></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?