1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
|
<?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>QTabWidget 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">  </td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QTabWidget Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QTabWidget class provides a stack of tabbed widgets. <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="qtabwidget.html#TabPosition-enum">TabPosition</a></b> { North, South, West, East }</li><li><div class="fn" />enum <b><a href="qtabwidget.html#TabShape-enum">TabShape</a></b> { Rounded, Triangular }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qtabwidget.html#QTabWidget">__init__</a></b> (<i>self</i>, QWidget <i>parent</i> = None)</li><li><div class="fn" />int <b><a href="qtabwidget.html#addTab">addTab</a></b> (<i>self</i>, QWidget <i>widget</i>, QString)</li><li><div class="fn" />int <b><a href="qtabwidget.html#addTab-2">addTab</a></b> (<i>self</i>, QWidget <i>widget</i>, QIcon <i>icon</i>, QString <i>label</i>)</li><li><div class="fn" /><b><a href="qtabwidget.html#changeEvent">changeEvent</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" />QWidget <b><a href="qtabwidget.html#cornerWidget">cornerWidget</a></b> (<i>self</i>, Qt.Corner <i>corner</i> = Qt.TopRightCorner)</li><li><div class="fn" />int <b><a href="qtabwidget.html#count">count</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qtabwidget.html#currentIndex">currentIndex</a></b> (<i>self</i>)</li><li><div class="fn" />QWidget <b><a href="qtabwidget.html#currentWidget">currentWidget</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtabwidget.html#event">event</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" />int <b><a href="qtabwidget.html#indexOf">indexOf</a></b> (<i>self</i>, QWidget <i>widget</i>)</li><li><div class="fn" />int <b><a href="qtabwidget.html#insertTab">insertTab</a></b> (<i>self</i>, int <i>index</i>, QWidget <i>widget</i>, QString)</li><li><div class="fn" />int <b><a href="qtabwidget.html#insertTab-2">insertTab</a></b> (<i>self</i>, int <i>index</i>, QWidget <i>widget</i>, QIcon <i>icon</i>, QString <i>label</i>)</li><li><div class="fn" />bool <b><a href="qtabwidget.html#isTabEnabled">isTabEnabled</a></b> (<i>self</i>, int <i>index</i>)</li><li><div class="fn" /><b><a href="qtabwidget.html#keyPressEvent">keyPressEvent</a></b> (<i>self</i>, QKeyEvent)</li><li><div class="fn" />QSize <b><a href="qtabwidget.html#minimumSizeHint">minimumSizeHint</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtabwidget.html#paintEvent">paintEvent</a></b> (<i>self</i>, QPaintEvent)</li><li><div class="fn" /><b><a href="qtabwidget.html#removeTab">removeTab</a></b> (<i>self</i>, int <i>index</i>)</li><li><div class="fn" /><b><a href="qtabwidget.html#resizeEvent">resizeEvent</a></b> (<i>self</i>, QResizeEvent)</li><li><div class="fn" /><b><a href="qtabwidget.html#setCornerWidget">setCornerWidget</a></b> (<i>self</i>, QWidget <i>w</i>, Qt.Corner <i>corner</i> = Qt.TopRightCorner)</li><li><div class="fn" /><b><a href="qtabwidget.html#setCurrentIndex">setCurrentIndex</a></b> (<i>self</i>, int <i>index</i>)</li><li><div class="fn" /><b><a href="qtabwidget.html#setCurrentWidget">setCurrentWidget</a></b> (<i>self</i>, QWidget <i>widget</i>)</li><li><div class="fn" /><b><a href="qtabwidget.html#setTabBar">setTabBar</a></b> (<i>self</i>, QTabBar)</li><li><div class="fn" /><b><a href="qtabwidget.html#setTabEnabled">setTabEnabled</a></b> (<i>self</i>, int <i>index</i>, bool)</li><li><div class="fn" /><b><a href="qtabwidget.html#setTabIcon">setTabIcon</a></b> (<i>self</i>, int <i>index</i>, QIcon <i>icon</i>)</li><li><div class="fn" /><b><a href="qtabwidget.html#setTabPosition">setTabPosition</a></b> (<i>self</i>, TabPosition)</li><li><div class="fn" /><b><a href="qtabwidget.html#setTabShape">setTabShape</a></b> (<i>self</i>, TabShape <i>s</i>)</li><li><div class="fn" /><b><a href="qtabwidget.html#setTabText">setTabText</a></b> (<i>self</i>, int <i>index</i>, QString)</li><li><div class="fn" /><b><a href="qtabwidget.html#setTabToolTip">setTabToolTip</a></b> (<i>self</i>, int <i>index</i>, QString <i>tip</i>)</li><li><div class="fn" /><b><a href="qtabwidget.html#setTabWhatsThis">setTabWhatsThis</a></b> (<i>self</i>, int <i>index</i>, QString <i>text</i>)</li><li><div class="fn" /><b><a href="qtabwidget.html#showEvent">showEvent</a></b> (<i>self</i>, QShowEvent)</li><li><div class="fn" />QSize <b><a href="qtabwidget.html#sizeHint">sizeHint</a></b> (<i>self</i>)</li><li><div class="fn" />QTabBar <b><a href="qtabwidget.html#tabBar">tabBar</a></b> (<i>self</i>)</li><li><div class="fn" />QIcon <b><a href="qtabwidget.html#tabIcon">tabIcon</a></b> (<i>self</i>, int <i>index</i>)</li><li><div class="fn" /><b><a href="qtabwidget.html#tabInserted">tabInserted</a></b> (<i>self</i>, int <i>index</i>)</li><li><div class="fn" />TabPosition <b><a href="qtabwidget.html#tabPosition">tabPosition</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtabwidget.html#tabRemoved">tabRemoved</a></b> (<i>self</i>, int <i>index</i>)</li><li><div class="fn" />TabShape <b><a href="qtabwidget.html#tabShape">tabShape</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qtabwidget.html#tabText">tabText</a></b> (<i>self</i>, int <i>index</i>)</li><li><div class="fn" />QString <b><a href="qtabwidget.html#tabToolTip">tabToolTip</a></b> (<i>self</i>, int <i>index</i>)</li><li><div class="fn" />QString <b><a href="qtabwidget.html#tabWhatsThis">tabWhatsThis</a></b> (<i>self</i>, int <i>index</i>)</li><li><div class="fn" />QWidget <b><a href="qtabwidget.html#widget">widget</a></b> (<i>self</i>, int <i>index</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qtabwidget.html#currentChanged">currentChanged</a></b> (int)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QTabWidget class provides a stack of tabbed widgets.</p>
<p>A tab widget provides a tab bar (see <a href="qtabbar.html">QTabBar</a>) and a "page area" that is used to display pages related to each tab. By default, the tab bar is shown above the page area, but different configurations are available (see <a href="qtabwidget.html#TabPosition-enum">TabPosition</a>). Each tab is associated with a different widget (called a page). Only the current page is shown in the page area; all the other pages are hidden. The user can show a different page by clicking on its tab or by pressing its Alt+<i>letter</i> shortcut if it has one.</p>
<p>The normal way to use QTabWidget is to do the following:</p>
<ol type="1">
<li>Create a QTabWidget.</li>
<li>Create a <a href="qwidget.html">QWidget</a> for each of the pages in the tab dialog, but do not specify a parent widget - the tab widget will reparent the page widget later.</li>
<li>Insert children into the page widget, set up geometry management for it and use <a href="qtabwidget.html#addTab">addTab</a>() (or <a href="qtabwidget.html#insertTab">insertTab</a>()) to set up a tab with an optional keyboard shortcut.</li>
<li>Connect to the signals and slots.</li>
</ol>
<p>The position of the tabs is defined by <a href="qtabwidget.html#tabPosition-prop">tabPosition</a>, their shape by <a href="qtabwidget.html#tabShape-prop">tabShape</a>.</p>
<p>The signal <a href="qtabwidget.html#currentChanged">currentChanged</a>() is emitted when the user selects a page.</p>
<p>The current page index is available as <a href="qtabwidget.html#currentIndex-prop">currentIndex</a>(), the current page widget with <a href="qtabwidget.html#currentWidget">currentWidget</a>(). You can retrieve a pointer to a page widget with a given index using <a href="qtabwidget.html#widget">widget</a>(), and can find the index position of a widget with <a href="qtabwidget.html#indexOf">indexOf</a>(). Use <a href="qtabwidget.html#setCurrentWidget">setCurrentWidget</a>() or <a href="qtabwidget.html#currentIndex-prop">setCurrentIndex</a>() to show a particular page.</p>
<p>You can change a tab's text and icon using <a href="qtabwidget.html#setTabText">setTabText</a>() or <a href="qtabwidget.html#setTabIcon">setTabIcon</a>(). A tab can be removed with <a href="qtabwidget.html#removeTab">removeTab</a>().</p>
<p>Each tab is either enabled or disabled at any given time (see <a href="qtabwidget.html#setTabEnabled">setTabEnabled</a>()). If a tab is enabled, the tab text is drawn normally and the user can select that tab. If it is disabled, the tab is drawn in a different way and the user cannot select that tab. Note that even if a tab is disabled, the page can still be visible, for example if all of the tabs happen to be disabled.</p>
<p>Tab widgets can be a very good way to split up a complex dialog. An alternative is to use a <a href="qstackedwidget.html">QStackedWidget</a> for which you provide some means of navigating between pages, for example, a <a href="qtoolbar.html">QToolBar</a> or a <a href="qlistwidget.html">QListWidget</a>.</p>
<p>Most of the functionality in QTabWidget is provided by a <a href="qtabbar.html">QTabBar</a> (at the top, providing the tabs) and a <a href="qstackedwidget.html">QStackedWidget</a> (most of the area, organizing the individual pages).</p>
<table align="center" border="0" cellpadding="2" cellspacing="1" width="100%">
<tr bgcolor="#F0F0F0" valign="top">
<td><img alt="Screenshot of a Windows XP style tab widget" src="images/windowsxp-tabwidget.png" /></td>
<td><img alt="Screenshot of a Macintosh style tab widget" src="images/macintosh-tabwidget.png" /></td>
<td><img alt="Screenshot of a Plastique style tab widget" src="images/plastique-tabwidget.png" /></td>
</tr>
<tr bgcolor="#E0E0E0" valign="top">
<td>A Windows XP style tab widget.</td>
<td>A Macintosh style tab widget.</td>
<td>A Plastique style tab widget.</td>
</tr>
</table>
<br />
<br />
<p>See also <a href="qtabbar.html">QTabBar</a>, <a href="qstackedwidget.html">QStackedWidget</a>, and <a href="qtoolbox.html">QToolBox</a>.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="TabPosition-enum" />QTabWidget.TabPosition</h3><p>This enum type defines where <a href="qtabwidget.html">QTabWidget</a> draws the tab row:</p>
<table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr>
<th width="25%">Constant</th>
<th width="15%">Value</th>
<th width="60%">Description</th>
</tr>
<tr>
<td valign="top"><tt>QTabWidget.North</tt></td>
<td align="center" valign="top"><tt>0</tt></td>
<td valign="top">The tabs are drawn above the pages.</td>
</tr>
<tr>
<td valign="top"><tt>QTabWidget.South</tt></td>
<td align="center" valign="top"><tt>1</tt></td>
<td valign="top">The tabs are drawn below the pages.</td>
</tr>
<tr>
<td valign="top"><tt>QTabWidget.West</tt></td>
<td align="center" valign="top"><tt>2</tt></td>
<td valign="top">The tabs are drawn to the left of the pages.</td>
</tr>
<tr>
<td valign="top"><tt>QTabWidget.East</tt></td>
<td align="center" valign="top"><tt>3</tt></td>
<td valign="top">The tabs are drawn to the right of the pages.</td>
</tr>
</table>
<br />
<br />
<h3 class="fn"><a name="TabShape-enum" />QTabWidget.TabShape</h3><p>This enum type defines the shape of the tabs:</p>
<table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr>
<th width="25%">Constant</th>
<th width="15%">Value</th>
<th width="60%">Description</th>
</tr>
<tr>
<td valign="top"><tt>QTabWidget.Rounded</tt></td>
<td align="center" valign="top"><tt>0</tt></td>
<td valign="top">rounded look (normal)</td>
</tr>
<tr>
<td valign="top"><tt>QTabWidget.Triangular</tt></td>
<td align="center" valign="top"><tt>1</tt></td>
<td valign="top">triangular look</td>
</tr>
</table>
<br />
<br />
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QTabWidget" />QTabWidget.__init__ (<i>self</i>, <a href="qwidget.html">QWidget</a> <i>parent</i> = 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 tabbed widget with parent <i>parent</i>.</p>
<h3 class="fn"><a name="addTab" />int QTabWidget.addTab (<i>self</i>, <a href="qwidget.html">QWidget</a> <i>widget</i>, <a href="qstring.html">QString</a>)</h3><p>The <i>widget</i> argument has it's ownership transferred to Qt.</p><p>Adds another tab and page to the tab view.</p>
<p>The new page is <i>child</i>; the tab's label is <i>label</i>.</p>
<p>If the tab's <i>label</i> contains an ampersand, the letter following the ampersand is used as a shortcut for the tab, e.g. if the label is "Bro&wse" then Alt+W becomes a shortcut which will move the focus to this tab.</p>
<p>See also <a href="qtabwidget.html#insertTab">insertTab</a>().</p>
<h3 class="fn"><a name="addTab-2" />int QTabWidget.addTab (<i>self</i>, <a href="qwidget.html">QWidget</a> <i>widget</i>, <a href="qicon.html">QIcon</a> <i>icon</i>, <a href="qstring.html">QString</a> <i>label</i>)</h3><p>The <i>widget</i> argument has it's ownership transferred to Qt.</p><p>This is an overloaded member function, provided for convenience.</p>
<p>Adds another tab and page to the tab view.</p>
<p>This function is the same as <a href="qtabwidget.html#addTab">addTab</a>(), but with an additional <i>icon</i>.</p>
<h3 class="fn"><a name="changeEvent" />QTabWidget.changeEvent (<i>self</i>, <a href="qevent.html">QEvent</a>)</h3><h3 class="fn"><a name="cornerWidget" /><a href="qwidget.html">QWidget</a> QTabWidget.cornerWidget (<i>self</i>, <a href="qt.html#Corner-enum">Qt.Corner</a> <i>corner</i> = Qt.TopRightCorner)</h3><p>Returns the widget shown in the <i>corner</i> of the tab widget or 0.</p>
<p>See also <a href="qtabwidget.html#setCornerWidget">setCornerWidget</a>().</p>
<h3 class="fn"><a name="count" />int QTabWidget.count (<i>self</i>)</h3><h3 class="fn"><a name="currentIndex" />int QTabWidget.currentIndex (<i>self</i>)</h3><h3 class="fn"><a name="currentWidget" /><a href="qwidget.html">QWidget</a> QTabWidget.currentWidget (<i>self</i>)</h3><p>Returns a pointer to the page currently being displayed by the tab dialog. The tab dialog does its best to make sure that this value is never 0 (but if you try hard enough, it can be).</p>
<p>See also <a href="qtabwidget.html#currentIndex-prop">currentIndex</a>() and <a href="qtabwidget.html#setCurrentWidget">setCurrentWidget</a>().</p>
<h3 class="fn"><a name="event" />bool QTabWidget.event (<i>self</i>, <a href="qevent.html">QEvent</a>)</h3><h3 class="fn"><a name="indexOf" />int QTabWidget.indexOf (<i>self</i>, <a href="qwidget.html">QWidget</a> <i>widget</i>)</h3><p>Returns the index position of the page occupied by the widget <i>w</i>, or -1 if the widget cannot be found.</p>
<h3 class="fn"><a name="insertTab" />int QTabWidget.insertTab (<i>self</i>, int <i>index</i>, <a href="qwidget.html">QWidget</a> <i>widget</i>, <a href="qstring.html">QString</a>)</h3><p>The <i>widget</i> argument has it's ownership transferred to Qt.</p><p>Inserts another tab and page to the tab view.</p>
<p>The new page is <i>w</i>; the tab's label is <i>label</i>. Note the difference between the widget name (which you supply to widget constructors and to <a href="qtabwidget.html#setTabEnabled">setTabEnabled</a>(), for example) and the tab label. The name is internal to the program and invariant, whereas the label is shown on-screen and may vary according to language and other factors.</p>
<p>If the tab's <i>label</i> contains an ampersand, the letter following the ampersand is used as a shortcut for the tab, e.g. if the label is "Bro&wse" then Alt+W becomes a shortcut which will move the focus to this tab.</p>
<p>If <i>index</i> is out of range, the tab is simply appended. Otherwise it is inserted at the specified position.</p>
<p>If the <a href="qtabwidget.html">QTabWidget</a> was empty before this function is called, <i>w</i> becomes the current page.</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 page.</p>
<p>If you call insertTab() after <a href="qwidget.html#show">show</a>(), the screen will flicker and the user may be confused.</p>
<p>See also <a href="qtabwidget.html#addTab">addTab</a>().</p>
<h3 class="fn"><a name="insertTab-2" />int QTabWidget.insertTab (<i>self</i>, int <i>index</i>, <a href="qwidget.html">QWidget</a> <i>widget</i>, <a href="qicon.html">QIcon</a> <i>icon</i>, <a href="qstring.html">QString</a> <i>label</i>)</h3><p>The <i>widget</i> argument has it's ownership transferred to Qt.</p><h3 class="fn"><a name="isTabEnabled" />bool QTabWidget.isTabEnabled (<i>self</i>, int <i>index</i>)</h3><p>Returns true if the the page at position <i>index</i> is enabled; otherwise returns false.</p>
<p>See also <a href="qtabwidget.html#setTabEnabled">setTabEnabled</a>() and <a href="qwidget.html#enabled-prop">QWidget.isEnabled</a>().</p>
<h3 class="fn"><a name="keyPressEvent" />QTabWidget.keyPressEvent (<i>self</i>, <a href="qkeyevent.html">QKeyEvent</a>)</h3><h3 class="fn"><a name="minimumSizeHint" /><a href="qsize.html">QSize</a> QTabWidget.minimumSizeHint (<i>self</i>)</h3><h3 class="fn"><a name="paintEvent" />QTabWidget.paintEvent (<i>self</i>, <a href="qpaintevent.html">QPaintEvent</a>)</h3><p>Paints the tab widget's tab bar in response to the paint <i>event</i>.</p>
<p>Reimplemented from <a href="qwidget.html#paintEvent">QWidget</a>.</p>
<h3 class="fn"><a name="removeTab" />QTabWidget.removeTab (<i>self</i>, int <i>index</i>)</h3><p>Removes the page at position <i>index</i> from this stack of widgets. Does not delete the page widget.</p>
<h3 class="fn"><a name="resizeEvent" />QTabWidget.resizeEvent (<i>self</i>, <a href="qresizeevent.html">QResizeEvent</a>)</h3><h3 class="fn"><a name="setCornerWidget" />QTabWidget.setCornerWidget (<i>self</i>, <a href="qwidget.html">QWidget</a> <i>w</i>, <a href="qt.html#Corner-enum">Qt.Corner</a> <i>corner</i> = Qt.TopRightCorner)</h3><p>Sets the given <i>widget</i> to be shown in the specified <i>corner</i> of the tab widget.</p>
<p>Only the horizontal element of the <i>corner</i> will be used.</p>
<p>See also <a href="qtabwidget.html#cornerWidget">cornerWidget</a>() and <a href="qtabwidget.html#tabPosition-prop">setTabPosition</a>().</p>
<h3 class="fn"><a name="setCurrentIndex" />QTabWidget.setCurrentIndex (<i>self</i>, int <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="setCurrentWidget" />QTabWidget.setCurrentWidget (<i>self</i>, <a href="qwidget.html">QWidget</a> <i>widget</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setCurrentWidget(QWidget *)</tt>.</p><p>Makes <i>widget</i> the current widget. The <i>widget</i> used must be a page in this tab widget.</p>
<p>See also <a href="qtabwidget.html#addTab">addTab</a>(), <a href="qtabwidget.html#currentIndex-prop">setCurrentIndex</a>(), and <a href="qtabwidget.html#currentWidget">currentWidget</a>().</p>
<h3 class="fn"><a name="setTabBar" />QTabWidget.setTabBar (<i>self</i>, <a href="qtabbar.html">QTabBar</a>)</h3><p>Replaces the dialog's <a href="qtabbar.html">QTabBar</a> heading with the tab bar <i>tb</i>. Note that this must be called <i>before</i> any tabs have been added, or the behavior is undefined.</p>
<p>See also <a href="qtabwidget.html#tabBar">tabBar</a>().</p>
<h3 class="fn"><a name="setTabEnabled" />QTabWidget.setTabEnabled (<i>self</i>, int <i>index</i>, bool)</h3><p>If <i>enable</i> is true, the page at position <i>index</i> is enabled; otherwise the page at position <i>index</i> is disabled. The page's tab is redrawn appropriately.</p>
<p><a href="qtabwidget.html">QTabWidget</a> uses <a href="qwidget.html#enabled-prop">QWidget.setEnabled</a>() internally, rather than keeping a separate flag.</p>
<p>Note that even a disabled tab/page may be visible. If the page is visible already, <a href="qtabwidget.html">QTabWidget</a> will not hide it; if all the pages are disabled, <a href="qtabwidget.html">QTabWidget</a> will show one of them.</p>
<p>See also <a href="qtabwidget.html#isTabEnabled">isTabEnabled</a>() and <a href="qwidget.html#enabled-prop">QWidget.setEnabled</a>().</p>
<h3 class="fn"><a name="setTabIcon" />QTabWidget.setTabIcon (<i>self</i>, int <i>index</i>, <a href="qicon.html">QIcon</a> <i>icon</i>)</h3><p>Sets the <i>icon</i> for the tab at position <i>index</i>.</p>
<p>See also <a href="qtabwidget.html#tabIcon">tabIcon</a>().</p>
<h3 class="fn"><a name="setTabPosition" />QTabWidget.setTabPosition (<i>self</i>, <a href="qtabwidget.html#TabPosition-enum">TabPosition</a>)</h3><h3 class="fn"><a name="setTabShape" />QTabWidget.setTabShape (<i>self</i>, <a href="qtabwidget.html#TabShape-enum">TabShape</a> <i>s</i>)</h3><h3 class="fn"><a name="setTabText" />QTabWidget.setTabText (<i>self</i>, int <i>index</i>, <a href="qstring.html">QString</a>)</h3><p>Defines a new <i>label</i> for the page at position <i>index</i>'s tab.</p>
<p>See also <a href="qtabwidget.html#tabText">tabText</a>().</p>
<h3 class="fn"><a name="setTabToolTip" />QTabWidget.setTabToolTip (<i>self</i>, int <i>index</i>, <a href="qstring.html">QString</a> <i>tip</i>)</h3><p>Sets the tab tool tip for the page at position <i>index</i> to <i>tip</i>.</p>
<p>See also <a href="qtabwidget.html#tabToolTip">tabToolTip</a>().</p>
<h3 class="fn"><a name="setTabWhatsThis" />QTabWidget.setTabWhatsThis (<i>self</i>, int <i>index</i>, <a href="qstring.html">QString</a> <i>text</i>)</h3><p>Sets the What's This help text for the page at position <i>index</i> to <i>text</i>.</p>
<p>This function was introduced in Qt 4.1.</p>
<p>See also <a href="qtabwidget.html#tabWhatsThis">tabWhatsThis</a>().</p>
<h3 class="fn"><a name="showEvent" />QTabWidget.showEvent (<i>self</i>, <a href="qshowevent.html">QShowEvent</a>)</h3><h3 class="fn"><a name="sizeHint" /><a href="qsize.html">QSize</a> QTabWidget.sizeHint (<i>self</i>)</h3><h3 class="fn"><a name="tabBar" /><a href="qtabbar.html">QTabBar</a> QTabWidget.tabBar (<i>self</i>)</h3><p>Returns the current <a href="qtabbar.html">QTabBar</a>.</p>
<p>See also <a href="qtabwidget.html#setTabBar">setTabBar</a>().</p>
<h3 class="fn"><a name="tabIcon" /><a href="qicon.html">QIcon</a> QTabWidget.tabIcon (<i>self</i>, int <i>index</i>)</h3><p>Returns the label text for the tab on the page at position <i>index</i>.</p>
<p>See also <a href="qtabwidget.html#setTabIcon">setTabIcon</a>().</p>
<h3 class="fn"><a name="tabInserted" />QTabWidget.tabInserted (<i>self</i>, int <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>See also <a href="qtabwidget.html#tabRemoved">tabRemoved</a>().</p>
<h3 class="fn"><a name="tabPosition" /><a href="qtabwidget.html#TabPosition-enum">TabPosition</a> QTabWidget.tabPosition (<i>self</i>)</h3><h3 class="fn"><a name="tabRemoved" />QTabWidget.tabRemoved (<i>self</i>, int <i>index</i>)</h3><p>This virtual handler is called after a tab was removed from position <i>index</i>.</p>
<p>See also <a href="qtabwidget.html#tabInserted">tabInserted</a>().</p>
<h3 class="fn"><a name="tabShape" /><a href="qtabwidget.html#TabShape-enum">TabShape</a> QTabWidget.tabShape (<i>self</i>)</h3><h3 class="fn"><a name="tabText" /><a href="qstring.html">QString</a> QTabWidget.tabText (<i>self</i>, int <i>index</i>)</h3><p>Returns the label text for the tab on the page at position <i>index</i>.</p>
<p>See also <a href="qtabwidget.html#setTabText">setTabText</a>().</p>
<h3 class="fn"><a name="tabToolTip" /><a href="qstring.html">QString</a> QTabWidget.tabToolTip (<i>self</i>, int <i>index</i>)</h3><p>Returns the tab tool tip for the page at position <i>index</i> or an empty string if no tool tip has been set.</p>
<p>See also <a href="qtabwidget.html#setTabToolTip">setTabToolTip</a>().</p>
<h3 class="fn"><a name="tabWhatsThis" /><a href="qstring.html">QString</a> QTabWidget.tabWhatsThis (<i>self</i>, int <i>index</i>)</h3><p>Returns the What's This help text for the page at position <i>index</i>, or an empty string if no help text has been set.</p>
<p>This function was introduced in Qt 4.1.</p>
<p>See also <a href="qtabwidget.html#setTabWhatsThis">setTabWhatsThis</a>().</p>
<h3 class="fn"><a name="widget" /><a href="qwidget.html">QWidget</a> QTabWidget.widget (<i>self</i>, int <i>index</i>)</h3><p>Returns the tab page at index position <i>index</i> or 0 if the <i>index</i> is out of range.</p>
<hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="currentChanged" />void currentChanged (int)</h3><p>This signal is emitted whenever the current page index changes. The parameter is the new current page <i>index</i> position.</p>
<p>See also <a href="qtabwidget.html#currentWidget">currentWidget</a>() and <a href="qtabwidget.html#currentIndex-prop">currentIndex</a>.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td width="25%">PyQt 4.0.1 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.trolltech.com">Trolltech AS</a> 2006</td><td align="right" width="25%">Qt 4.1.4</td></tr></table></div></address></body></html>
|