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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/widgets/qtabwidget.cpp:54 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>QTabWidget Class</title>
<style type="text/css"><!--
fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #ffffff; color: black; }
--></style>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="#E5E5E5">
<td valign=center>
<a href="index.html">
<font color="#004faf">Home</font></a>
| <a href="classes.html">
<font color="#004faf">All Classes</font></a>
| <a href="mainclasses.html">
<font color="#004faf">Main Classes</font></a>
| <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
| <a href="groups.html">
<font color="#004faf">Grouped Classes</font></a>
| <a href="functions.html">
<font color="#004faf">Functions</font></a>
</td>
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QTabWidget Class Reference</h1>
<p>The QTabWidget class provides a stack of tabbed widgets.
<a href="#details">More...</a>
<p><tt>#include <<a href="qtabwidget-h.html">qtabwidget.h</a>></tt>
<p>Inherits <a href="qwidget.html">QWidget</a>.
<p><a href="qtabwidget-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li class=fn><a href="#QTabWidget"><b>QTabWidget</b></a> ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 )</li>
<li class=fn>virtual void <a href="#addTab"><b>addTab</b></a> ( QWidget * child, const QString & label )</li>
<li class=fn>virtual void <a href="#addTab-2"><b>addTab</b></a> ( QWidget * child, const QIconSet & iconset, const QString & label )</li>
<li class=fn>virtual void <a href="#addTab-3"><b>addTab</b></a> ( QWidget * child, QTab * tab )</li>
<li class=fn>virtual void <a href="#insertTab"><b>insertTab</b></a> ( QWidget * child, const QString & label, int index = -1 )</li>
<li class=fn>virtual void <a href="#insertTab-2"><b>insertTab</b></a> ( QWidget * child, const QIconSet & iconset, const QString & label, int index = -1 )</li>
<li class=fn>virtual void <a href="#insertTab-3"><b>insertTab</b></a> ( QWidget * child, QTab * tab, int index = -1 )</li>
<li class=fn>void <a href="#changeTab"><b>changeTab</b></a> ( QWidget * w, const QString & label )</li>
<li class=fn>void <a href="#changeTab-2"><b>changeTab</b></a> ( QWidget * w, const QIconSet & iconset, const QString & label )</li>
<li class=fn>bool <a href="#isTabEnabled"><b>isTabEnabled</b></a> ( QWidget * w ) const</li>
<li class=fn>void <a href="#setTabEnabled"><b>setTabEnabled</b></a> ( QWidget * w, bool enable )</li>
<li class=fn>void <a href="#setCornerWidget"><b>setCornerWidget</b></a> ( QWidget * w, Qt::Corner corner = Qt::TopRight )</li>
<li class=fn>QWidget * <a href="#cornerWidget"><b>cornerWidget</b></a> ( Qt::Corner corner = Qt::TopRight ) const</li>
<li class=fn>QString <a href="#tabLabel"><b>tabLabel</b></a> ( QWidget * w ) const</li>
<li class=fn>void <a href="#setTabLabel"><b>setTabLabel</b></a> ( QWidget * w, const QString & l )</li>
<li class=fn>QIconSet <a href="#tabIconSet"><b>tabIconSet</b></a> ( QWidget * w ) const</li>
<li class=fn>void <a href="#setTabIconSet"><b>setTabIconSet</b></a> ( QWidget * w, const QIconSet & iconset )</li>
<li class=fn>void <a href="#removeTabToolTip"><b>removeTabToolTip</b></a> ( QWidget * w )</li>
<li class=fn>void <a href="#setTabToolTip"><b>setTabToolTip</b></a> ( QWidget * w, const QString & tip )</li>
<li class=fn>QString <a href="#tabToolTip"><b>tabToolTip</b></a> ( QWidget * w ) const</li>
<li class=fn>QWidget * <a href="#currentPage"><b>currentPage</b></a> () const</li>
<li class=fn>QWidget * <a href="#page"><b>page</b></a> ( int index ) const</li>
<li class=fn>QString <a href="#label"><b>label</b></a> ( int index ) const</li>
<li class=fn>int <a href="#currentPageIndex"><b>currentPageIndex</b></a> () const</li>
<li class=fn>int <a href="#indexOf"><b>indexOf</b></a> ( QWidget * w ) const</li>
<li class=fn>enum <a href="#TabPosition-enum"><b>TabPosition</b></a> { Top, Bottom }</li>
<li class=fn>TabPosition <a href="#tabPosition"><b>tabPosition</b></a> () const</li>
<li class=fn>void <a href="#setTabPosition"><b>setTabPosition</b></a> ( TabPosition )</li>
<li class=fn>enum <a href="#TabShape-enum"><b>TabShape</b></a> { Rounded, Triangular }</li>
<li class=fn>TabShape <a href="#tabShape"><b>tabShape</b></a> () const</li>
<li class=fn>void <a href="#setTabShape"><b>setTabShape</b></a> ( TabShape s )</li>
<li class=fn>int <a href="#margin"><b>margin</b></a> () const</li>
<li class=fn>void <a href="#setMargin"><b>setMargin</b></a> ( int )</li>
<li class=fn>int <a href="#count"><b>count</b></a> () const</li>
</ul>
<h2>Public Slots</h2>
<ul>
<li class=fn>void <a href="#setCurrentPage"><b>setCurrentPage</b></a> ( int )</li>
<li class=fn>virtual void <a href="#showPage"><b>showPage</b></a> ( QWidget * w )</li>
<li class=fn>virtual void <a href="#removePage"><b>removePage</b></a> ( QWidget * w )</li>
</ul>
<h2>Signals</h2>
<ul>
<li class=fn>void <a href="#currentChanged"><b>currentChanged</b></a> ( QWidget * )</li>
</ul>
<h2>Properties</h2>
<ul>
<li class=fn>bool <a href="#autoMask-prop"><b>autoMask</b></a> - whether the tab widget is automatically masked <em>(read only)</em></li>
<li class=fn>int <a href="#count-prop"><b>count</b></a> - the number of tabs in the tab bar <em>(read only)</em></li>
<li class=fn>int <a href="#currentPage-prop"><b>currentPage</b></a> - the index position of the current tab page</li>
<li class=fn>int <a href="#margin-prop"><b>margin</b></a> - the margin in this tab widget</li>
<li class=fn>TabPosition <a href="#tabPosition-prop"><b>tabPosition</b></a> - the position of the tabs in this tab widget</li>
<li class=fn>TabShape <a href="#tabShape-prop"><b>tabShape</b></a> - the shape of the tabs in this tab widget</li>
</ul>
<h2>Protected Members</h2>
<ul>
<li class=fn>void <a href="#setTabBar"><b>setTabBar</b></a> ( QTabBar * tb )</li>
<li class=fn>QTabBar * <a href="#tabBar"><b>tabBar</b></a> () const</li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>
The QTabWidget class provides a stack of tabbed widgets.
<p>
<p> A tab widget provides a tab bar of tabs and a `page area' below
(or above, see <a href="#TabPosition-enum">TabPosition</a>) the tabs. Each tab is associated
with a different widget (called a `page'). Only the current tab's
page is shown in the page area; all the other tabs' pages are
hidden. The user can show a different page by clicking on its tab
or by pressing its Alt+<em>letter</em> accelerator if it has one.
<p> The normal way to use QTabWidget is to do the following in the
constructor:
<ol type=1>
<li> Create a QTabWidget.
<li> Create a <a href="qwidget.html">QWidget</a> for each of the pages in the tab dialog,
insert children into it, set up geometry management for it and use
<a href="#addTab">addTab</a>() (or <a href="#insertTab">insertTab</a>()) to set up a tab and keyboard accelerator
for it.
<li> Connect to the signals and slots.
</ol>
<p> The position of the tabs is set with <a href="#setTabPosition">setTabPosition</a>(), their shape
with <a href="#setTabShape">setTabShape</a>(), and their margin with <a href="#setMargin">setMargin</a>().
<p> If you don't call addTab() and the QTabWidget is already visible,
then the page you have created will not be visible. Don't
confuse the object name you supply to the QWidget constructor and
the tab label you supply to addTab(). addTab() takes a name which
indicates an accelerator and is meaningful and descriptive to the
user, whereas the widget name is used primarily for debugging.
<p> The signal <a href="#currentChanged">currentChanged</a>() is emitted when the user selects a
page.
<p> The current page is available as an index position with
<a href="#currentPageIndex">currentPageIndex</a>() or as a wiget pointer with <a href="#currentPage">currentPage</a>(). You
can retrieve a pointer to a page with a given index using <a href="#page">page</a>(),
and can find the index position of a page with <a href="#indexOf">indexOf</a>(). Use
<a href="#setCurrentPage">setCurrentPage</a>() to show a particular page by index, or <a href="#showPage">showPage</a>()
to show a page by widget pointer.
<p> You can change a tab's label and iconset using <a href="#changeTab">changeTab</a>() or
<a href="#setTabLabel">setTabLabel</a>() and <a href="#setTabIconSet">setTabIconSet</a>(). A tab page can be removed with
<a href="#removePage">removePage</a>().
<p> Each tab is either enabled or disabled at any given time (see
<a href="#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> Although tab widgets can be a very good way to split up a complex
dialog, it's also very easy to get into a mess. See <a href="qtabdialog.html">QTabDialog</a> for
some design hints. An alternative is to use a <a href="qwidgetstack.html">QWidgetStack</a> for
which you provide some means of navigating between pages, for
example, a <a href="qtoolbar.html">QToolBar</a> or a <a href="qlistbox.html">QListBox</a>.
<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 QWidgetStack (most of the
area, organizing the individual pages).
<p> <img src=qtabwidget-m.png> <img src=qtabwidget-w.png>
<p> <p>See also <a href="qtabdialog.html">QTabDialog</a>, <a href="qtoolbox.html">QToolBox</a>, <a href="advanced.html">Advanced Widgets</a>, and <a href="organizers.html">Organizers</a>.
<hr><h2>Member Type Documentation</h2>
<h3 class=fn><a name="TabPosition-enum"></a>QTabWidget::TabPosition</h3>
<p> This enum type defines where QTabWidget draws the tab row:
<ul>
<li><tt>QTabWidget::Top</tt> - above the pages
<li><tt>QTabWidget::Bottom</tt> - below the pages
</ul>
<h3 class=fn><a name="TabShape-enum"></a>QTabWidget::TabShape</h3>
<p> This enum type defines the shape of the tabs:
<ul>
<li><tt>QTabWidget::Rounded</tt> - rounded look (normal)
<li><tt>QTabWidget::Triangular</tt> - triangular look (very unusual, included for completeness)
</ul>
<hr><h2>Member Function Documentation</h2>
<h3 class=fn><a name="QTabWidget"></a>QTabWidget::QTabWidget ( <a href="qwidget.html">QWidget</a> * parent = 0, const char * name = 0, WFlags f = 0 )
</h3>
Constructs a tabbed widget called <em>name</em> with parent <em>parent</em>,
and widget flags <em>f</em>.
<h3 class=fn>void <a name="addTab"></a>QTabWidget::addTab ( <a href="qwidget.html">QWidget</a> * child, const <a href="qstring.html">QString</a> & label )<tt> [virtual]</tt>
</h3>
Adds another tab and page to the tab view.
<p> The new page is <em>child</em>; the tab's label is <em>label</em>. Note the
difference between the widget name (which you supply to widget
constructors and to <a href="#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> If the tab's <em>label</em> contains an ampersand, the letter following
the ampersand is used as an accelerator for the tab, e.g. if the
label is "Bro&wse" then Alt+W becomes an accelerator which will
move the focus to this tab.
<p> If you call <a href="#addTab">addTab</a>() after <a href="qwidget.html#show">show</a>() the screen will flicker and the
user may be confused.
<p> Adding the same child twice will have undefined behavior.
<p> <p>See also <a href="#insertTab">insertTab</a>().
<p>Examples: <a href="addressbook-example.html#x600">addressbook/centralwidget.cpp</a> and <a href="themes-example.html#x343">themes/themes.cpp</a>.
<h3 class=fn>void <a name="addTab-2"></a>QTabWidget::addTab ( <a href="qwidget.html">QWidget</a> * child, const <a href="qiconset.html">QIconSet</a> & iconset, const <a href="qstring.html">QString</a> & label )<tt> [virtual]</tt>
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Adds another tab and page to the tab view.
<p> This function is the same as <a href="#addTab">addTab</a>(), but with an additional <em>iconset</em>.
<h3 class=fn>void <a name="addTab-3"></a>QTabWidget::addTab ( <a href="qwidget.html">QWidget</a> * child, <a href="qtab.html">QTab</a> * tab )<tt> [virtual]</tt>
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> This is a low-level function for adding tabs. It is useful if you
are using <a href="#setTabBar">setTabBar</a>() to set a <a href="qtabbar.html">QTabBar</a> subclass with an overridden
<a href="qtabbar.html#paint">QTabBar::paint</a>() function for a subclass of <a href="qtab.html">QTab</a>. The <em>child</em> is
the new page and <em>tab</em> is the tab to put the <em>child</em> on.
<h3 class=fn>void <a name="changeTab"></a>QTabWidget::changeTab ( <a href="qwidget.html">QWidget</a> * w, const <a href="qstring.html">QString</a> & label )
</h3>
Defines a new <em>label</em> for page <em>w</em>'s tab.
<h3 class=fn>void <a name="changeTab-2"></a>QTabWidget::changeTab ( <a href="qwidget.html">QWidget</a> * w, const <a href="qiconset.html">QIconSet</a> & iconset, const <a href="qstring.html">QString</a> & label )
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Defines a new <em>iconset</em> and a new <em>label</em> for page <em>w</em>'s tab.
<h3 class=fn><a href="qwidget.html">QWidget</a> * <a name="cornerWidget"></a>QTabWidget::cornerWidget ( <a href="qt.html#Corner-enum">Qt::Corner</a> corner = Qt::TopRight ) const
</h3>
Returns the widget shown in the <em>corner</em> of the tab widget or 0.
<h3 class=fn>int <a name="count"></a>QTabWidget::count () const
</h3><p>Returns the number of tabs in the tab bar.
See the <a href="qtabwidget.html#count-prop">"count"</a> property for details.
<h3 class=fn>void <a name="currentChanged"></a>QTabWidget::currentChanged ( <a href="qwidget.html">QWidget</a> * )<tt> [signal]</tt>
</h3>
<p> This signal is emitted whenever the current page changes. The
parameter is the new current page.
<p> <p>See also <a href="#currentPage">currentPage</a>(), <a href="#showPage">showPage</a>(), and <a href="#tabLabel">tabLabel</a>().
<h3 class=fn><a href="qwidget.html">QWidget</a> * <a name="currentPage"></a>QTabWidget::currentPage () const
</h3>
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).
<h3 class=fn>int <a name="currentPageIndex"></a>QTabWidget::currentPageIndex () const
</h3><p>Returns the index position of the current tab page.
See the <a href="qtabwidget.html#currentPage-prop">"currentPage"</a> property for details.
<h3 class=fn>int <a name="indexOf"></a>QTabWidget::indexOf ( <a href="qwidget.html">QWidget</a> * w ) const
</h3>
Returns the index position of page <em>w</em>, or -1 if the widget
cannot be found.
<h3 class=fn>void <a name="insertTab"></a>QTabWidget::insertTab ( <a href="qwidget.html">QWidget</a> * child, const <a href="qstring.html">QString</a> & label, int index = -1 )<tt> [virtual]</tt>
</h3>
Inserts another tab and page to the tab view.
<p> The new page is <em>child</em>; the tab's label is <em>label</em>. Note the
difference between the widget name (which you supply to widget
constructors and to <a href="#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> If the tab's <em>label</em> contains an ampersand, the letter following
the ampersand is used as an accelerator for the tab, e.g. if the
label is "Bro&wse" then Alt+W becomes an accelerator which will
move the focus to this tab.
<p> If <em>index</em> is not specified, the tab is simply appended.
Otherwise it is inserted at the specified position.
<p> If you call <a href="#insertTab">insertTab</a>() after <a href="qwidget.html#show">show</a>(), the screen will flicker and
the user may be confused.
<p> <p>See also <a href="#addTab">addTab</a>().
<h3 class=fn>void <a name="insertTab-2"></a>QTabWidget::insertTab ( <a href="qwidget.html">QWidget</a> * child, const <a href="qiconset.html">QIconSet</a> & iconset, const <a href="qstring.html">QString</a> & label, int index = -1 )<tt> [virtual]</tt>
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Inserts another tab and page to the tab view.
<p> This function is the same as <a href="#insertTab">insertTab</a>(), but with an additional
<em>iconset</em>.
<h3 class=fn>void <a name="insertTab-3"></a>QTabWidget::insertTab ( <a href="qwidget.html">QWidget</a> * child, <a href="qtab.html">QTab</a> * tab, int index = -1 )<tt> [virtual]</tt>
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> This is a lower-level method for inserting tabs, similar to the
other <a href="#insertTab">insertTab</a>() method. It is useful if you are using
<a href="#setTabBar">setTabBar</a>() to set a <a href="qtabbar.html">QTabBar</a> subclass with an overridden
<a href="qtabbar.html#paint">QTabBar::paint</a>() function for a subclass of <a href="qtab.html">QTab</a>. The <em>child</em> is
the new page, <em>tab</em> is the tab to put the <em>child</em> on and <em>index</em> is the position in the tab bar that this page should occupy.
<h3 class=fn>bool <a name="isTabEnabled"></a>QTabWidget::isTabEnabled ( <a href="qwidget.html">QWidget</a> * w ) const
</h3>
Returns TRUE if the page <em>w</em> is enabled; otherwise returns FALSE.
<p> <p>See also <a href="#setTabEnabled">setTabEnabled</a>() and <a href="qwidget.html#enabled-prop">QWidget::enabled</a>.
<h3 class=fn><a href="qstring.html">QString</a> <a name="label"></a>QTabWidget::label ( int index ) const
</h3>
Returns the label of the tab at index position <em>index</em> or
<a href="qstring.html#QString-null">QString::null</a> if the <em>index</em> is out of range.
<h3 class=fn>int <a name="margin"></a>QTabWidget::margin () const
</h3><p>Returns the margin in this tab widget.
See the <a href="qtabwidget.html#margin-prop">"margin"</a> property for details.
<h3 class=fn><a href="qwidget.html">QWidget</a> * <a name="page"></a>QTabWidget::page ( int index ) const
</h3>
Returns the tab page at index position <em>index</em> or 0 if the <em>index</em> is out of range.
<h3 class=fn>void <a name="removePage"></a>QTabWidget::removePage ( <a href="qwidget.html">QWidget</a> * w )<tt> [virtual slot]</tt>
</h3>
Removes page <em>w</em> from this stack of widgets. Does not delete <em>w</em>.
<p> <p>See also <a href="#addTab">addTab</a>(), <a href="#showPage">showPage</a>(), and <a href="qwidgetstack.html#removeWidget">QWidgetStack::removeWidget</a>().
<h3 class=fn>void <a name="removeTabToolTip"></a>QTabWidget::removeTabToolTip ( <a href="qwidget.html">QWidget</a> * w )
</h3>
Removes the tab tool tip for page <em>w</em>. If the page does not have
a tip, nothing happens.
<p> <p>See also <a href="#setTabToolTip">setTabToolTip</a>() and <a href="#tabToolTip">tabToolTip</a>().
<h3 class=fn>void <a name="setCornerWidget"></a>QTabWidget::setCornerWidget ( <a href="qwidget.html">QWidget</a> * w, <a href="qt.html#Corner-enum">Qt::Corner</a> corner = Qt::TopRight )
</h3>
Sets widget <em>w</em> to be the shown in the specified <em>corner</em> of the
tab widget.
<p> Only the horizontal element of the <em>corner</em> will be used.
<p> <p>See also <a href="#cornerWidget">cornerWidget</a>() and <a href="#tabPosition-prop">tabPosition</a>.
<h3 class=fn>void <a name="setCurrentPage"></a>QTabWidget::setCurrentPage ( int )<tt> [slot]</tt>
</h3><p>Sets the index position of the current tab page.
See the <a href="qtabwidget.html#currentPage-prop">"currentPage"</a> property for details.
<h3 class=fn>void <a name="setMargin"></a>QTabWidget::setMargin ( int )
</h3><p>Sets the margin in this tab widget.
See the <a href="qtabwidget.html#margin-prop">"margin"</a> property for details.
<h3 class=fn>void <a name="setTabBar"></a>QTabWidget::setTabBar ( <a href="qtabbar.html">QTabBar</a> * tb )<tt> [protected]</tt>
</h3>
Replaces the dialog's <a href="qtabbar.html">QTabBar</a> heading with the tab bar <em>tb</em>. Note
that this must be called <em>before</em> any tabs have been added, or
the behavior is undefined.
<p> <p>See also <a href="#tabBar">tabBar</a>().
<h3 class=fn>void <a name="setTabEnabled"></a>QTabWidget::setTabEnabled ( <a href="qwidget.html">QWidget</a> * w, bool enable )
</h3>
If <em>enable</em> is TRUE, page <em>w</em> is enabled; otherwise page <em>w</em> is
disabled. The page's tab is redrawn appropriately.
<p> QTabWidget uses <a href="qwidget.html#setEnabled">QWidget::setEnabled</a>() internally, rather than
keeping a separate flag.
<p> Note that even a disabled tab/page may be visible. If the page is
visible already, QTabWidget will not hide it; if all the pages are
disabled, QTabWidget will show one of them.
<p> <p>See also <a href="#isTabEnabled">isTabEnabled</a>() and <a href="qwidget.html#enabled-prop">QWidget::enabled</a>.
<h3 class=fn>void <a name="setTabIconSet"></a>QTabWidget::setTabIconSet ( <a href="qwidget.html">QWidget</a> * w, const <a href="qiconset.html">QIconSet</a> & iconset )
</h3>
Sets the iconset for page <em>w</em> to <em>iconset</em>.
<h3 class=fn>void <a name="setTabLabel"></a>QTabWidget::setTabLabel ( <a href="qwidget.html">QWidget</a> * w, const <a href="qstring.html">QString</a> & l )
</h3>
Sets the tab label for page <em>w</em> to <em>l</em>
<h3 class=fn>void <a name="setTabPosition"></a>QTabWidget::setTabPosition ( <a href="qtabwidget.html#TabPosition-enum">TabPosition</a> )
</h3><p>Sets the position of the tabs in this tab widget.
See the <a href="qtabwidget.html#tabPosition-prop">"tabPosition"</a> property for details.
<h3 class=fn>void <a name="setTabShape"></a>QTabWidget::setTabShape ( <a href="qtabwidget.html#TabShape-enum">TabShape</a> s )
</h3><p>Sets the shape of the tabs in this tab widget to <em>s</em>.
See the <a href="qtabwidget.html#tabShape-prop">"tabShape"</a> property for details.
<h3 class=fn>void <a name="setTabToolTip"></a>QTabWidget::setTabToolTip ( <a href="qwidget.html">QWidget</a> * w, const <a href="qstring.html">QString</a> & tip )
</h3>
Sets the tab tool tip for page <em>w</em> to <em>tip</em>.
<p> <p>See also <a href="#removeTabToolTip">removeTabToolTip</a>() and <a href="#tabToolTip">tabToolTip</a>().
<h3 class=fn>void <a name="showPage"></a>QTabWidget::showPage ( <a href="qwidget.html">QWidget</a> * w )<tt> [virtual slot]</tt>
</h3>
Ensures that page <em>w</em> is shown. This is useful mainly for
accelerators.
<p> <b>Warning:</b> Used carelessly, this function can easily surprise or
confuse the user.
<p> <p>See also <a href="qtabbar.html#currentTab-prop">QTabBar::currentTab</a>.
<h3 class=fn><a href="qtabbar.html">QTabBar</a> * <a name="tabBar"></a>QTabWidget::tabBar () const<tt> [protected]</tt>
</h3>
Returns the current <a href="qtabbar.html">QTabBar</a>.
<p> <p>See also <a href="#setTabBar">setTabBar</a>().
<h3 class=fn><a href="qiconset.html">QIconSet</a> <a name="tabIconSet"></a>QTabWidget::tabIconSet ( <a href="qwidget.html">QWidget</a> * w ) const
</h3>
Returns the iconset of page <em>w</em> or a <a href="qiconset.html#QIconSet">null iconset</a> if <em>w</em> is not a tab page or does not have an
iconset.
<h3 class=fn><a href="qstring.html">QString</a> <a name="tabLabel"></a>QTabWidget::tabLabel ( <a href="qwidget.html">QWidget</a> * w ) const
</h3>
Returns the label text for the tab on page <em>w</em>.
<h3 class=fn><a href="qtabwidget.html#TabPosition-enum">TabPosition</a> <a name="tabPosition"></a>QTabWidget::tabPosition () const
</h3><p>Returns the position of the tabs in this tab widget.
See the <a href="qtabwidget.html#tabPosition-prop">"tabPosition"</a> property for details.
<h3 class=fn><a href="qtabwidget.html#TabShape-enum">TabShape</a> <a name="tabShape"></a>QTabWidget::tabShape () const
</h3><p>Returns the shape of the tabs in this tab widget.
See the <a href="qtabwidget.html#tabShape-prop">"tabShape"</a> property for details.
<h3 class=fn><a href="qstring.html">QString</a> <a name="tabToolTip"></a>QTabWidget::tabToolTip ( <a href="qwidget.html">QWidget</a> * w ) const
</h3>
Returns the tab tool tip for page <em>w</em> or <a href="qstring.html#QString-null">QString::null</a> if no tool
tip has been set.
<p> <p>See also <a href="#setTabToolTip">setTabToolTip</a>() and <a href="#removeTabToolTip">removeTabToolTip</a>().
<hr><h2>Property Documentation</h2>
<h3 class=fn>bool <a name="autoMask-prop"></a>autoMask</h3>
<p>This property holds whether the tab widget is automatically masked.
<p><p><p>See also <a href="qwidget.html#autoMask-prop">QWidget::autoMask</a>.
<h3 class=fn>int <a name="count-prop"></a>count</h3>
<p>This property holds the number of tabs in the tab bar.
<p>
<p>Get this property's value with <a href="#count">count</a>().
<h3 class=fn>int <a name="currentPage-prop"></a>currentPage</h3>
<p>This property holds the index position of the current tab page.
<p>Set this property's value with <a href="#setCurrentPage">setCurrentPage</a>() and get this property's value with <a href="#currentPageIndex">currentPageIndex</a>().
<p><p>See also <a href="qtabbar.html#currentTab-prop">QTabBar::currentTab</a>.
<h3 class=fn>int <a name="margin-prop"></a>margin</h3>
<p>This property holds the margin in this tab widget.
<p>The margin is the distance between the innermost pixel of the
frame and the outermost pixel of the pages.
<p>Set this property's value with <a href="#setMargin">setMargin</a>() and get this property's value with <a href="#margin">margin</a>().
<h3 class=fn><a href="qtabwidget.html#TabPosition-enum">TabPosition</a> <a name="tabPosition-prop"></a>tabPosition</h3>
<p>This property holds the position of the tabs in this tab widget.
<p>Possible values for this property are <a href="#TabPosition-enum">QTabWidget::Top</a> and <a href="#TabPosition-enum">QTabWidget::Bottom</a>.
<p> <p>See also <a href="#TabPosition-enum">TabPosition</a>.
<p>Set this property's value with <a href="#setTabPosition">setTabPosition</a>() and get this property's value with <a href="#tabPosition">tabPosition</a>().
<h3 class=fn><a href="qtabwidget.html#TabShape-enum">TabShape</a> <a name="tabShape-prop"></a>tabShape</h3>
<p>This property holds the shape of the tabs in this tab widget.
<p>Possible values for this property are <a href="#TabShape-enum">QTabWidget::Rounded</a>
(default) or <a href="#TabShape-enum">QTabWidget::Triangular</a>.
<p> <p>See also <a href="#TabShape-enum">TabShape</a>.
<p>Set this property's value with <a href="#setTabShape">setTabShape</a>() and get this property's value with <a href="#tabShape">tabShape</a>().
<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>.
Copyright © 1995-2007
<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 © 2007
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
<td align=right><div align=right>Qt 3.3.8</div>
</table></div></address></body>
</html>
|