Sophie

Sophie

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

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>QTabBar 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">QTabBar Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QTabBar class provides a tab bar, e.g. for use in tabbed
dialogs. <a href="#details">More...</a></p>

<p>Inherits <a href="qwidget.html">QWidget</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qtabbar.html#ButtonPosition-enum">ButtonPosition</a></b> { LeftSide, RightSide }</li><li><div class="fn" />enum <b><a href="qtabbar.html#SelectionBehavior-enum">SelectionBehavior</a></b> { SelectLeftTab, SelectRightTab, SelectPreviousTab }</li><li><div class="fn" />enum <b><a href="qtabbar.html#Shape-enum">Shape</a></b> { RoundedNorth, RoundedSouth, RoundedWest, RoundedEast, ..., TriangularEast }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qtabbar.html#QTabBar">__init__</a></b> (<i>self</i>, QWidget&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" />int <b><a href="qtabbar.html#addTab">addTab</a></b> (<i>self</i>, QString&#160;<i>text</i>)</li><li><div class="fn" />int <b><a href="qtabbar.html#addTab-2">addTab</a></b> (<i>self</i>, QIcon&#160;<i>icon</i>, QString&#160;<i>text</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#changeEvent">changeEvent</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" />int <b><a href="qtabbar.html#count">count</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qtabbar.html#currentIndex">currentIndex</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtabbar.html#documentMode">documentMode</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtabbar.html#drawBase">drawBase</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.TextElideMode <b><a href="qtabbar.html#elideMode">elideMode</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtabbar.html#event">event</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" />bool <b><a href="qtabbar.html#expanding">expanding</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#hideEvent">hideEvent</a></b> (<i>self</i>, QHideEvent)</li><li><div class="fn" />QSize <b><a href="qtabbar.html#iconSize">iconSize</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#initStyleOption">initStyleOption</a></b> (<i>self</i>, QStyleOptionTab&#160;<i>option</i>, int&#160;<i>tabIndex</i>)</li><li><div class="fn" />int <b><a href="qtabbar.html#insertTab">insertTab</a></b> (<i>self</i>, int&#160;<i>index</i>, QString&#160;<i>text</i>)</li><li><div class="fn" />int <b><a href="qtabbar.html#insertTab-2">insertTab</a></b> (<i>self</i>, int&#160;<i>index</i>, QIcon&#160;<i>icon</i>, QString&#160;<i>text</i>)</li><li><div class="fn" />bool <b><a href="qtabbar.html#isMovable">isMovable</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtabbar.html#isTabEnabled">isTabEnabled</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#keyPressEvent">keyPressEvent</a></b> (<i>self</i>, QKeyEvent)</li><li><div class="fn" />QSize <b><a href="qtabbar.html#minimumSizeHint">minimumSizeHint</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#mouseMoveEvent">mouseMoveEvent</a></b> (<i>self</i>, QMouseEvent)</li><li><div class="fn" /><b><a href="qtabbar.html#mousePressEvent">mousePressEvent</a></b> (<i>self</i>, QMouseEvent)</li><li><div class="fn" /><b><a href="qtabbar.html#mouseReleaseEvent">mouseReleaseEvent</a></b> (<i>self</i>, QMouseEvent)</li><li><div class="fn" /><b><a href="qtabbar.html#moveTab">moveTab</a></b> (<i>self</i>, int&#160;<i>from</i>, int&#160;<i>to</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#paintEvent">paintEvent</a></b> (<i>self</i>, QPaintEvent)</li><li><div class="fn" /><b><a href="qtabbar.html#removeTab">removeTab</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#resizeEvent">resizeEvent</a></b> (<i>self</i>, QResizeEvent)</li><li><div class="fn" />SelectionBehavior <b><a href="qtabbar.html#selectionBehaviorOnRemove">selectionBehaviorOnRemove</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#setCurrentIndex">setCurrentIndex</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#setDocumentMode">setDocumentMode</a></b> (<i>self</i>, bool&#160;<i>set</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#setDrawBase">setDrawBase</a></b> (<i>self</i>, bool&#160;<i>drawTheBase</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#setElideMode">setElideMode</a></b> (<i>self</i>, Qt.TextElideMode)</li><li><div class="fn" /><b><a href="qtabbar.html#setExpanding">setExpanding</a></b> (<i>self</i>, bool&#160;<i>enabled</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#setIconSize">setIconSize</a></b> (<i>self</i>, QSize&#160;<i>size</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#setMovable">setMovable</a></b> (<i>self</i>, bool&#160;<i>movable</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#setSelectionBehaviorOnRemove">setSelectionBehaviorOnRemove</a></b> (<i>self</i>, SelectionBehavior&#160;<i>behavior</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#setShape">setShape</a></b> (<i>self</i>, Shape&#160;<i>shape</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#setTabButton">setTabButton</a></b> (<i>self</i>, int&#160;<i>index</i>, ButtonPosition&#160;<i>position</i>, QWidget&#160;<i>widget</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#setTabData">setTabData</a></b> (<i>self</i>, int&#160;<i>index</i>, QVariant&#160;<i>data</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#setTabEnabled">setTabEnabled</a></b> (<i>self</i>, int&#160;<i>index</i>, bool)</li><li><div class="fn" /><b><a href="qtabbar.html#setTabIcon">setTabIcon</a></b> (<i>self</i>, int&#160;<i>index</i>, QIcon&#160;<i>icon</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#setTabsClosable">setTabsClosable</a></b> (<i>self</i>, bool&#160;<i>closable</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#setTabText">setTabText</a></b> (<i>self</i>, int&#160;<i>index</i>, QString&#160;<i>text</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#setTabTextColor">setTabTextColor</a></b> (<i>self</i>, int&#160;<i>index</i>, QColor&#160;<i>color</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#setTabToolTip">setTabToolTip</a></b> (<i>self</i>, int&#160;<i>index</i>, QString&#160;<i>tip</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#setTabWhatsThis">setTabWhatsThis</a></b> (<i>self</i>, int&#160;<i>index</i>, QString&#160;<i>text</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#setUsesScrollButtons">setUsesScrollButtons</a></b> (<i>self</i>, bool&#160;<i>useButtons</i>)</li><li><div class="fn" />Shape <b><a href="qtabbar.html#shape">shape</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#showEvent">showEvent</a></b> (<i>self</i>, QShowEvent)</li><li><div class="fn" />QSize <b><a href="qtabbar.html#sizeHint">sizeHint</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qtabbar.html#tabAt">tabAt</a></b> (<i>self</i>, QPoint&#160;<i>pos</i>)</li><li><div class="fn" />QWidget <b><a href="qtabbar.html#tabButton">tabButton</a></b> (<i>self</i>, int&#160;<i>index</i>, ButtonPosition&#160;<i>position</i>)</li><li><div class="fn" />QVariant <b><a href="qtabbar.html#tabData">tabData</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />QIcon <b><a href="qtabbar.html#tabIcon">tabIcon</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#tabInserted">tabInserted</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#tabLayoutChange">tabLayoutChange</a></b> (<i>self</i>)</li><li><div class="fn" />QRect <b><a href="qtabbar.html#tabRect">tabRect</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#tabRemoved">tabRemoved</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />bool <b><a href="qtabbar.html#tabsClosable">tabsClosable</a></b> (<i>self</i>)</li><li><div class="fn" />QSize <b><a href="qtabbar.html#tabSizeHint">tabSizeHint</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />QString <b><a href="qtabbar.html#tabText">tabText</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />QColor <b><a href="qtabbar.html#tabTextColor">tabTextColor</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />QString <b><a href="qtabbar.html#tabToolTip">tabToolTip</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />QString <b><a href="qtabbar.html#tabWhatsThis">tabWhatsThis</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />bool <b><a href="qtabbar.html#usesScrollButtons">usesScrollButtons</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtabbar.html#wheelEvent">wheelEvent</a></b> (<i>self</i>, QWheelEvent&#160;<i>event</i>)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" /> <b><a href="qtabbar.html#__len__">__len__</a></b> (<i>self</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qtabbar.html#currentChanged">currentChanged</a></b> (int)</li><li><div class="fn" />void <b><a href="qtabbar.html#tabCloseRequested">tabCloseRequested</a></b> (int)</li><li><div class="fn" />void <b><a href="qtabbar.html#tabMoved">tabMoved</a></b> (int,int)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QTabBar class provides a tab bar, e.g. for use in tabbed
dialogs.</p>
<p>QTabBar is straightforward to use; it draws the tabs using one
of the predefined <a href="qtabbar.html#Shape-enum">shapes</a>, and
emits a signal when a tab is selected. It can be subclassed to
tailor the look and feel. Qt also provides a ready-made <a href="qtabwidget.html">QTabWidget</a>.</p>
<p>Each tab has a <a href="qtabbar.html#tabText">tabText</a>(), an
optional <a href="qtabbar.html#tabIcon">tabIcon</a>(), an optional
<a href="qtabbar.html#tabToolTip">tabToolTip</a>(), optional
<a href="qtabbar.html#tabWhatsThis">tabWhatsThis</a>() and optional
<a href="qtabbar.html#tabData">tabData</a>(). The tabs's attributes
can be changed with <a href="qtabbar.html#setTabText">setTabText</a>(), <a href="qtabbar.html#setTabIcon">setTabIcon</a>(), <a href="qtabbar.html#setTabToolTip">setTabToolTip</a>(), setTabWhatsThis
and <a href="qtabbar.html#setTabData">setTabData</a>(). Each tabs
can be enabled or disabled individually with <a href="qtabbar.html#setTabEnabled">setTabEnabled</a>().</p>
<p>Each tab can display text in a distinct color. The current text
color for a tab can be found with the <a href="qtabbar.html#tabTextColor">tabTextColor</a>() function. Set the
text color for a particular tab with <a href="qtabbar.html#setTabTextColor">setTabTextColor</a>().</p>
<p>Tabs are added using <a href="qtabbar.html#addTab">addTab</a>(),
or inserted at particular positions using <a href="qtabbar.html#insertTab">insertTab</a>(). The total number of tabs
is given by <a href="qtabbar.html#count-prop">count</a>(). Tabs can
be removed from the tab bar with <a href="qtabbar.html#removeTab">removeTab</a>(). Combining <a href="qtabbar.html#removeTab">removeTab</a>() and <a href="qtabbar.html#insertTab">insertTab</a>() allows you to move tabs to
different positions.</p>
<p>The <a href="qtabbar.html#shape-prop">shape</a> property defines
the tabs' appearance. The choice of shape is a matter of taste,
although tab dialogs (for preferences and similar) invariably use
<a href="qtabbar.html#Shape-enum">RoundedNorth</a>. Tab controls in
windows other than dialogs almost always use either <a href="qtabbar.html#Shape-enum">RoundedSouth</a> or <a href="qtabbar.html#Shape-enum">TriangularSouth</a>. Many spreadsheets
and other tab controls in which all the pages are essentially
similar use <a href="qtabbar.html#Shape-enum">TriangularSouth</a>,
whereas <a href="qtabbar.html#Shape-enum">RoundedSouth</a> is used
mostly when the pages are different (e.g. a multi-page tool
palette). The default in QTabBar is <a href="qtabbar.html#Shape-enum">RoundedNorth</a>.</p>
<p>The most important part of QTabBar's API is the <a href="qtabbar.html#currentChanged">currentChanged</a>() signal. This is
emitted whenever the current tab changes (even at startup, when the
current tab changes from 'none'). There is also a slot, <a href="qtabbar.html#currentIndex-prop">setCurrentIndex</a>(), which can
be used to select a tab programmatically. The function <a href="qtabbar.html#currentIndex-prop">currentIndex</a>() returns the
index of the current tab, <a href="qtabbar.html#count-prop">count</a> holds the number of tabs.</p>
<p>QTabBar creates automatic mnemonic keys in the manner of
<a href="qabstractbutton.html">QAbstractButton</a>; e.g. if a tab's
label is "&amp;Graphics", Alt+G becomes a shortcut key for
switching to that tab.</p>
<p>The following virtual functions may need to be reimplemented in
order to tailor the look and feel or store extra data with each
tab:</p>
<ul>
<li><a href="qtabbar.html#tabSizeHint">tabSizeHint</a>() calcuates
the size of a tab.</li>
<li><a href="qtabbar.html#tabInserted">tabInserted</a>() notifies
that a new tab was added.</li>
<li><a href="qtabbar.html#tabRemoved">tabRemoved</a>() notifies
that a tab was removed.</li>
<li><a href="qtabbar.html#tabLayoutChange">tabLayoutChange</a>()
notifies that the tabs have been re-laid out.</li>
<li><a href="qtabbar.html#paintEvent">paintEvent</a>() paints all
tabs.</li>
</ul>
<p>For subclasses, you might also need the <a href="qtabbar.html#tabRect">tabRect</a>() functions which returns the
visual geometry of a single tab.</p>
<table class="generic" width="100%">
<tr class="odd" valign="top">
<td><img alt="Screenshot of a Plastique style tab bar" src="images/plastique-tabbar.png" /></td>
<td>A tab bar shown in the Plastique widget style.</td>
</tr>
<tr class="even" valign="top">
<td><img alt="Screenshot of a truncated Plastique tab bar" src="images/plastique-tabbar-truncated.png" /></td>
<td>A truncated tab bar shown in the Plastique widget style.</td>
</tr>
</table>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="ButtonPosition-enum" />QTabBar.ButtonPosition</h3><p>This enum type lists the location of the widget on a tab.</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>QTabBar.LeftSide</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">Left side of the tab.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTabBar.RightSide</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">Right side of the tab.</td>
</tr>
</table>
<p>This enum was introduced or modified in Qt 4.5.</p>


<h3 class="fn"><a name="SelectionBehavior-enum" />QTabBar.SelectionBehavior</h3><p>This enum type lists the behavior of <a href="qtabbar.html">QTabBar</a> when a tab is removed and the tab being
removed is also the current tab.</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>QTabBar.SelectLeftTab</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">Select the tab to the left of the one being
removed.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTabBar.SelectRightTab</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">Select the tab to the right of the one being
removed.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTabBar.SelectPreviousTab</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">Select the previously selected tab.</td>
</tr>
</table>
<p>This enum was introduced or modified in Qt 4.5.</p>


<h3 class="fn"><a name="Shape-enum" />QTabBar.Shape</h3><p>This enum type lists the built-in shapes supported by <a href="qtabbar.html">QTabBar</a>. Treat these as hints as some styles may
not render some of the shapes. However, position should be
honored.</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>QTabBar.RoundedNorth</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">The normal rounded look above the pages</td>
</tr>
<tr>
<td class="topAlign"><tt>QTabBar.RoundedSouth</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">The normal rounded look below the pages</td>
</tr>
<tr>
<td class="topAlign"><tt>QTabBar.RoundedWest</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">The normal rounded look on the left side of
the pages</td>
</tr>
<tr>
<td class="topAlign"><tt>QTabBar.RoundedEast</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">The normal rounded look on the right side the
pages</td>
</tr>
<tr>
<td class="topAlign"><tt>QTabBar.TriangularNorth</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign">Triangular tabs above the pages.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTabBar.TriangularSouth</tt></td>
<td class="topAlign"><tt>5</tt></td>
<td class="topAlign">Triangular tabs similar to those used in the
Excel spreadsheet, for example</td>
</tr>
<tr>
<td class="topAlign"><tt>QTabBar.TriangularWest</tt></td>
<td class="topAlign"><tt>6</tt></td>
<td class="topAlign">Triangular tabs on the left of the pages.</td>
</tr>
<tr>
<td class="topAlign"><tt>QTabBar.TriangularEast</tt></td>
<td class="topAlign"><tt>7</tt></td>
<td class="topAlign">Triangular tabs on the right of the
pages.</td>
</tr>
</table>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QTabBar" />QTabBar.__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>Creates a new tab bar with the given <i>parent</i>.</p>


<h3 class="fn"><a name="addTab" />int QTabBar.addTab (<i>self</i>, QString&#160;<i>text</i>)</h3><p>Adds a new tab with text <i>text</i>. Returns the new tab's
index.</p>


<h3 class="fn"><a name="addTab-2" />int QTabBar.addTab (<i>self</i>, <a href="qicon.html">QIcon</a>&#160;<i>icon</i>, QString&#160;<i>text</i>)</h3><p>This is an overloaded function.</p>
<p>Adds a new tab with icon <i>icon</i> and text <i>text</i>.
Returns the new tab's index.</p>


<h3 class="fn"><a name="changeEvent" />QTabBar.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="count" />int QTabBar.count (<i>self</i>)</h3><h3 class="fn"><a name="currentIndex" />int QTabBar.currentIndex (<i>self</i>)</h3><h3 class="fn"><a name="documentMode" />bool QTabBar.documentMode (<i>self</i>)</h3><h3 class="fn"><a name="drawBase" />bool QTabBar.drawBase (<i>self</i>)</h3><h3 class="fn"><a name="elideMode" /><a href="qt.html#TextElideMode-enum">Qt.TextElideMode</a> QTabBar.elideMode (<i>self</i>)</h3><h3 class="fn"><a name="event" />bool QTabBar.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="expanding" />bool QTabBar.expanding (<i>self</i>)</h3><h3 class="fn"><a name="hideEvent" />QTabBar.hideEvent (<i>self</i>, <a href="qhideevent.html">QHideEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#hideEvent">QWidget.hideEvent</a>().</p>


<h3 class="fn"><a name="iconSize" /><a href="qsize.html">QSize</a> QTabBar.iconSize (<i>self</i>)</h3><h3 class="fn"><a name="initStyleOption" />QTabBar.initStyleOption (<i>self</i>, <a href="qstyleoptiontab.html">QStyleOptionTab</a>&#160;<i>option</i>, int&#160;<i>tabIndex</i>)</h3><p>Initialize <i>option</i> with the values from the tab at
<i>tabIndex</i>. This method is useful for subclasses when they
need a <a href="qstyleoptiontab.html">QStyleOptionTab</a>, <a href="qstyleoptiontabv2.html">QStyleOptionTabV2</a>, or <a href="qstyleoptiontabv3.html">QStyleOptionTabV3</a> but don't want to
fill in all the information themselves. This function will check
the version of the <a href="qstyleoptiontab.html">QStyleOptionTab</a> and fill in the
additional values for a <a href="qstyleoptiontabv2.html">QStyleOptionTabV2</a> and <a href="qstyleoptiontabv3.html">QStyleOptionTabV3</a>.</p>
<p><b>See also</b> <a href="qstyleoption.html#initFrom">QStyleOption.initFrom</a>() and
<a href="qtabwidget.html#initStyleOption">QTabWidget.initStyleOption</a>().</p>


<h3 class="fn"><a name="insertTab" />int QTabBar.insertTab (<i>self</i>, int&#160;<i>index</i>, QString&#160;<i>text</i>)</h3><p>Inserts a new tab with text <i>text</i> at position
<i>index</i>. If <i>index</i> is out of range, the new tab is
appened. Returns the new tab's index.</p>


<h3 class="fn"><a name="insertTab-2" />int QTabBar.insertTab (<i>self</i>, int&#160;<i>index</i>, <a href="qicon.html">QIcon</a>&#160;<i>icon</i>, QString&#160;<i>text</i>)</h3><p>This is an overloaded function.</p>
<p>Inserts a new tab with icon <i>icon</i> and text <i>text</i> at
position <i>index</i>. If <i>index</i> is out of range, the new tab
is appended. Returns the new tab's index.</p>
<p>If the <a href="qtabbar.html">QTabBar</a> was empty before this
function is called, the inserted tab becomes the current tab.</p>
<p>Inserting a new tab at an index less than or equal to the
current index will increment the current index, but keep the
current tab.</p>


<h3 class="fn"><a name="isMovable" />bool QTabBar.isMovable (<i>self</i>)</h3><h3 class="fn"><a name="isTabEnabled" />bool QTabBar.isTabEnabled (<i>self</i>, int&#160;<i>index</i>)</h3><p>Returns true if the tab at position <i>index</i> is enabled;
otherwise returns false.</p>


<h3 class="fn"><a name="keyPressEvent" />QTabBar.keyPressEvent (<i>self</i>, <a href="qkeyevent.html">QKeyEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#keyPressEvent">QWidget.keyPressEvent</a>().</p>


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


<h3 class="fn"><a name="mouseMoveEvent" />QTabBar.mouseMoveEvent (<i>self</i>, <a href="qmouseevent.html">QMouseEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#mouseMoveEvent">QWidget.mouseMoveEvent</a>().</p>


<h3 class="fn"><a name="mousePressEvent" />QTabBar.mousePressEvent (<i>self</i>, <a href="qmouseevent.html">QMouseEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#mousePressEvent">QWidget.mousePressEvent</a>().</p>


<h3 class="fn"><a name="mouseReleaseEvent" />QTabBar.mouseReleaseEvent (<i>self</i>, <a href="qmouseevent.html">QMouseEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#mouseReleaseEvent">QWidget.mouseReleaseEvent</a>().</p>


<h3 class="fn"><a name="moveTab" />QTabBar.moveTab (<i>self</i>, int&#160;<i>from</i>, int&#160;<i>to</i>)</h3><p>Moves the item at index position <i>from</i> to index position
<i>to</i>.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qtabbar.html#tabMoved">tabMoved</a>()
and <a href="qtabbar.html#tabLayoutChange">tabLayoutChange</a>().</p>


<h3 class="fn"><a name="paintEvent" />QTabBar.paintEvent (<i>self</i>, <a href="qpaintevent.html">QPaintEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#paintEvent">QWidget.paintEvent</a>().</p>


<h3 class="fn"><a name="removeTab" />QTabBar.removeTab (<i>self</i>, int&#160;<i>index</i>)</h3><p>Removes the tab at position <i>index</i>.</p>
<p><b>See also</b> <a href="qtabbar.html#SelectionBehavior-enum">SelectionBehavior</a>.</p>


<h3 class="fn"><a name="resizeEvent" />QTabBar.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="selectionBehaviorOnRemove" /><a href="qtabbar.html#SelectionBehavior-enum">SelectionBehavior</a> QTabBar.selectionBehaviorOnRemove (<i>self</i>)</h3><h3 class="fn"><a name="setCurrentIndex" />QTabBar.setCurrentIndex (<i>self</i>, int&#160;<i>index</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setCurrentIndex(int)</tt>.</p><h3 class="fn"><a name="setDocumentMode" />QTabBar.setDocumentMode (<i>self</i>, bool&#160;<i>set</i>)</h3><h3 class="fn"><a name="setDrawBase" />QTabBar.setDrawBase (<i>self</i>, bool&#160;<i>drawTheBase</i>)</h3><h3 class="fn"><a name="setElideMode" />QTabBar.setElideMode (<i>self</i>, <a href="qt.html#TextElideMode-enum">Qt.TextElideMode</a>)</h3><h3 class="fn"><a name="setExpanding" />QTabBar.setExpanding (<i>self</i>, bool&#160;<i>enabled</i>)</h3><h3 class="fn"><a name="setIconSize" />QTabBar.setIconSize (<i>self</i>, <a href="qsize.html">QSize</a>&#160;<i>size</i>)</h3><h3 class="fn"><a name="setMovable" />QTabBar.setMovable (<i>self</i>, bool&#160;<i>movable</i>)</h3><h3 class="fn"><a name="setSelectionBehaviorOnRemove" />QTabBar.setSelectionBehaviorOnRemove (<i>self</i>, <a href="qtabbar.html#SelectionBehavior-enum">SelectionBehavior</a>&#160;<i>behavior</i>)</h3><h3 class="fn"><a name="setShape" />QTabBar.setShape (<i>self</i>, <a href="qtabbar.html#Shape-enum">Shape</a>&#160;<i>shape</i>)</h3><h3 class="fn"><a name="setTabButton" />QTabBar.setTabButton (<i>self</i>, int&#160;<i>index</i>, <a href="qtabbar.html#ButtonPosition-enum">ButtonPosition</a>&#160;<i>position</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>Sets <i>widget</i> on the tab <i>index</i>. The widget is placed
on the left or right hand side depending upon the
<i>position</i>.</p>
<p>Any previously set widget in <i>position</i> is hidden.</p>
<p>The tab bar will take ownership of the widget and so all widgets
set here will be deleted by the tab bar when it is destroyed unless
you separately reparent the widget after setting some other widget
(or 0).</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qtabbar.html#tabButton">tabButton</a>()
and <a href="qtabbar.html#tabsClosable-prop">tabsClosable</a>().</p>


<h3 class="fn"><a name="setTabData" />QTabBar.setTabData (<i>self</i>, int&#160;<i>index</i>, QVariant&#160;<i>data</i>)</h3><p>Sets the data of the tab at position <i>index</i> to
<i>data</i>.</p>
<p><b>See also</b> <a href="qtabbar.html#tabData">tabData</a>().</p>


<h3 class="fn"><a name="setTabEnabled" />QTabBar.setTabEnabled (<i>self</i>, int&#160;<i>index</i>, bool)</h3><p>If <i>enabled</i> is true then the tab at position <i>index</i>
is enabled; otherwise the item at position <i>index</i> is
disabled.</p>
<p><b>See also</b> <a href="qtabbar.html#isTabEnabled">isTabEnabled</a>().</p>


<h3 class="fn"><a name="setTabIcon" />QTabBar.setTabIcon (<i>self</i>, int&#160;<i>index</i>, <a href="qicon.html">QIcon</a>&#160;<i>icon</i>)</h3><p>Sets the icon of the tab at position <i>index</i> to
<i>icon</i>.</p>
<p><b>See also</b> <a href="qtabbar.html#tabIcon">tabIcon</a>().</p>


<h3 class="fn"><a name="setTabsClosable" />QTabBar.setTabsClosable (<i>self</i>, bool&#160;<i>closable</i>)</h3><h3 class="fn"><a name="setTabText" />QTabBar.setTabText (<i>self</i>, int&#160;<i>index</i>, QString&#160;<i>text</i>)</h3><p>Sets the text of the tab at position <i>index</i> to
<i>text</i>.</p>
<p><b>See also</b> <a href="qtabbar.html#tabText">tabText</a>().</p>


<h3 class="fn"><a name="setTabTextColor" />QTabBar.setTabTextColor (<i>self</i>, int&#160;<i>index</i>, <a href="qcolor.html">QColor</a>&#160;<i>color</i>)</h3><p>Sets the color of the text in the tab with the given
<i>index</i> to the specified <i>color</i>.</p>
<p>If an invalid color is specified, the tab will use the <a href="qtabbar.html">QTabBar</a> foreground role instead.</p>
<p><b>See also</b> <a href="qtabbar.html#tabTextColor">tabTextColor</a>().</p>


<h3 class="fn"><a name="setTabToolTip" />QTabBar.setTabToolTip (<i>self</i>, int&#160;<i>index</i>, QString&#160;<i>tip</i>)</h3><p>Sets the tool tip of the tab at position <i>index</i> to
<i>tip</i>.</p>
<p><b>See also</b> <a href="qtabbar.html#tabToolTip">tabToolTip</a>().</p>


<h3 class="fn"><a name="setTabWhatsThis" />QTabBar.setTabWhatsThis (<i>self</i>, int&#160;<i>index</i>, QString&#160;<i>text</i>)</h3><p>Sets the What's This help text of the tab at position
<i>index</i> to <i>text</i>.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also</b> <a href="qtabbar.html#tabWhatsThis">tabWhatsThis</a>().</p>


<h3 class="fn"><a name="setUsesScrollButtons" />QTabBar.setUsesScrollButtons (<i>self</i>, bool&#160;<i>useButtons</i>)</h3><h3 class="fn"><a name="shape" /><a href="qtabbar.html#Shape-enum">Shape</a> QTabBar.shape (<i>self</i>)</h3><h3 class="fn"><a name="showEvent" />QTabBar.showEvent (<i>self</i>, <a href="qshowevent.html">QShowEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#showEvent">QWidget.showEvent</a>().</p>


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


<h3 class="fn"><a name="tabAt" />int QTabBar.tabAt (<i>self</i>, <a href="qpoint.html">QPoint</a>&#160;<i>pos</i>)</h3><p>Returns the index of the tab that covers <i>position</i> or -1
if no tab covers <i>position</i>;</p>
<p>This function was introduced in Qt 4.3.</p>


<h3 class="fn"><a name="tabButton" /><a href="qwidget.html">QWidget</a> QTabBar.tabButton (<i>self</i>, int&#160;<i>index</i>, <a href="qtabbar.html#ButtonPosition-enum">ButtonPosition</a>&#160;<i>position</i>)</h3><p>Returns the widget set a tab <i>index</i> and <i>position</i> or
0 if one is not set.</p>
<p><b>See also</b> <a href="qtabbar.html#setTabButton">setTabButton</a>().</p>


<h3 class="fn"><a name="tabData" />QVariant QTabBar.tabData (<i>self</i>, int&#160;<i>index</i>)</h3><p>Returns the data of the tab at position <i>index</i>, or a null
variant if <i>index</i> is out of range.</p>
<p><b>See also</b> <a href="qtabbar.html#setTabData">setTabData</a>().</p>


<h3 class="fn"><a name="tabIcon" /><a href="qicon.html">QIcon</a> QTabBar.tabIcon (<i>self</i>, int&#160;<i>index</i>)</h3><p>Returns the icon of the tab at position <i>index</i>, or a null
icon if <i>index</i> is out of range.</p>
<p><b>See also</b> <a href="qtabbar.html#setTabIcon">setTabIcon</a>().</p>


<h3 class="fn"><a name="tabInserted" />QTabBar.tabInserted (<i>self</i>, int&#160;<i>index</i>)</h3><p>This virtual handler is called after a new tab was added or
inserted at position <i>index</i>.</p>
<p><b>See also</b> <a href="qtabbar.html#tabRemoved">tabRemoved</a>().</p>


<h3 class="fn"><a name="tabLayoutChange" />QTabBar.tabLayoutChange (<i>self</i>)</h3><p>This virtual handler is called whenever the tab layout
changes.</p>
<p><b>See also</b> <a href="qtabbar.html#tabRect">tabRect</a>().</p>


<h3 class="fn"><a name="tabRect" /><a href="qrect.html">QRect</a> QTabBar.tabRect (<i>self</i>, int&#160;<i>index</i>)</h3><p>Returns the visual rectangle of the tab at position
<i>index</i>, or a null rectangle if <i>index</i> is out of
range.</p>


<h3 class="fn"><a name="tabRemoved" />QTabBar.tabRemoved (<i>self</i>, int&#160;<i>index</i>)</h3><p>This virtual handler is called after a tab was removed from
position <i>index</i>.</p>
<p><b>See also</b> <a href="qtabbar.html#tabInserted">tabInserted</a>().</p>


<h3 class="fn"><a name="tabsClosable" />bool QTabBar.tabsClosable (<i>self</i>)</h3><h3 class="fn"><a name="tabSizeHint" /><a href="qsize.html">QSize</a> QTabBar.tabSizeHint (<i>self</i>, int&#160;<i>index</i>)</h3><p>Returns the size hint for the tab at position <i>index</i>.</p>


<h3 class="fn"><a name="tabText" />QString QTabBar.tabText (<i>self</i>, int&#160;<i>index</i>)</h3><p>Returns the text of the tab at position <i>index</i>, or an
empty string if <i>index</i> is out of range.</p>
<p><b>See also</b> <a href="qtabbar.html#setTabText">setTabText</a>().</p>


<h3 class="fn"><a name="tabTextColor" /><a href="qcolor.html">QColor</a> QTabBar.tabTextColor (<i>self</i>, int&#160;<i>index</i>)</h3><p>Returns the text color of the tab with the given <i>index</i>,
or a invalid color if <i>index</i> is out of range.</p>
<p><b>See also</b> <a href="qtabbar.html#setTabTextColor">setTabTextColor</a>().</p>


<h3 class="fn"><a name="tabToolTip" />QString QTabBar.tabToolTip (<i>self</i>, int&#160;<i>index</i>)</h3><p>Returns the tool tip of the tab at position <i>index</i>, or an
empty string if <i>index</i> is out of range.</p>
<p><b>See also</b> <a href="qtabbar.html#setTabToolTip">setTabToolTip</a>().</p>


<h3 class="fn"><a name="tabWhatsThis" />QString QTabBar.tabWhatsThis (<i>self</i>, int&#160;<i>index</i>)</h3><p>Returns the What's This help text of the tab at position
<i>index</i>, or an empty string if <i>index</i> is out of
range.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also</b> <a href="qtabbar.html#setTabWhatsThis">setTabWhatsThis</a>().</p>


<h3 class="fn"><a name="usesScrollButtons" />bool QTabBar.usesScrollButtons (<i>self</i>)</h3><h3 class="fn"><a name="wheelEvent" />QTabBar.wheelEvent (<i>self</i>, <a href="qwheelevent.html">QWheelEvent</a>&#160;<i>event</i>)</h3><p>Reimplemented from <a href="qwidget.html#wheelEvent">QWidget.wheelEvent</a>().</p>
<h3 class="fn"><a name="__len__" /> QTabBar.__len__ (<i>self</i>)</h3><hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="currentChanged" />void currentChanged (int)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the tab bar's current tab changes.
The new current has the given <i>index</i>, or -1 if there isn't a
new one (for example, if there are no tab in the <a href="qtabbar.html">QTabBar</a>)</p>


<h3 class="fn"><a name="tabCloseRequested" />void tabCloseRequested (int)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the close button on a tab is
clicked. The <i>index</i> is the index that should be removed.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qtabbar.html#tabsClosable-prop">setTabsClosable</a>().</p>


<h3 class="fn"><a name="tabMoved" />void tabMoved (int,int)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the tab has moved the tab at index
position <i>from</i> to index position <i>to</i>.</p>
<p>note: <a href="qtabwidget.html">QTabWidget</a> will
automatically move the page when this signal is emitted from its
tab bar.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qtabbar.html#moveTab">moveTab</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>