File: qtreewidget.html

package info (click to toggle)
qt4-x11 4%3A4.8.2%2Bdfsg-11
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 701,696 kB
  • sloc: cpp: 2,686,179; ansic: 375,485; python: 25,859; sh: 19,349; xml: 17,091; perl: 14,765; yacc: 5,383; asm: 5,038; makefile: 1,259; lex: 555; ruby: 526; objc: 347; cs: 112; pascal: 112; php: 54; sed: 34
file content (571 lines) | stat: -rw-r--r-- 64,347 bytes parent folder | download
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
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qtreewidget.cpp -->
  <title>Qt 4.8: QTreeWidget Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="content"> 
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
  </div>
  <div class="breadcrumb toolblock">
    <ul>
      <li class="first"><a href="index.html">Home</a></li>
      <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtgui.html">QtGui</a></li>
<li>QTreeWidget</li>
    </ul>
  </div>
</div>
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QTreeWidget Class Reference</h1>
<!-- $$$QTreeWidget-brief -->
<p>The QTreeWidget class provides a tree view that uses a predefined tree model. <a href="#details">More...</a></p>
<!-- @@@QTreeWidget -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QTreeWidget&gt;</span></pre><p><b>Inherits: </b><a href="qtreeview.html">QTreeView</a>.</p>
<ul>
<li><a href="qtreewidget-members.html">List of all members, including inherited members</a></li>
<li><a href="qtreewidget-obsolete.html">Obsolete members</a></li>
</ul>
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li class="fn"><b><a href="qtreewidget.html#columnCount-prop">columnCount</a></b> : int</li>
<li class="fn"><b><a href="qtreewidget.html#topLevelItemCount-prop">topLevelItemCount</a></b> : const int</li>
</ul>
<ul>
<li class="fn">11 properties inherited from <a href="qtreeview.html#properties">QTreeView</a></li>
<li class="fn">16 properties inherited from <a href="qabstractitemview.html#properties">QAbstractItemView</a></li>
<li class="fn">2 properties inherited from <a href="qabstractscrollarea.html#properties">QAbstractScrollArea</a></li>
<li class="fn">6 properties inherited from <a href="qframe.html#properties">QFrame</a></li>
<li class="fn">58 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#QTreeWidget">QTreeWidget</a></b> ( QWidget * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#dtor.QTreeWidget">~QTreeWidget</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#addTopLevelItem">addTopLevelItem</a></b> ( QTreeWidgetItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#addTopLevelItems">addTopLevelItems</a></b> ( const QList&lt;QTreeWidgetItem *&gt; &amp; <i>items</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#closePersistentEditor">closePersistentEditor</a></b> ( QTreeWidgetItem * <i>item</i>, int <i>column</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#columnCount-prop">columnCount</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#currentColumn">currentColumn</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTreeWidgetItem * </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#currentItem">currentItem</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#editItem">editItem</a></b> ( QTreeWidgetItem * <i>item</i>, int <i>column</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QTreeWidgetItem *&gt; </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#findItems">findItems</a></b> ( const QString &amp; <i>text</i>, Qt::MatchFlags <i>flags</i>, int <i>column</i> = 0 ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTreeWidgetItem * </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#headerItem">headerItem</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#indexOfTopLevelItem">indexOfTopLevelItem</a></b> ( QTreeWidgetItem * <i>item</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#insertTopLevelItem">insertTopLevelItem</a></b> ( int <i>index</i>, QTreeWidgetItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#insertTopLevelItems">insertTopLevelItems</a></b> ( int <i>index</i>, const QList&lt;QTreeWidgetItem *&gt; &amp; <i>items</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTreeWidgetItem * </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#invisibleRootItem">invisibleRootItem</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#isFirstItemColumnSpanned">isFirstItemColumnSpanned</a></b> ( const QTreeWidgetItem * <i>item</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTreeWidgetItem * </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#itemAbove">itemAbove</a></b> ( const QTreeWidgetItem * <i>item</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTreeWidgetItem * </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#itemAt">itemAt</a></b> ( const QPoint &amp; <i>p</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTreeWidgetItem * </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#itemAt-2">itemAt</a></b> ( int <i>x</i>, int <i>y</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTreeWidgetItem * </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#itemBelow">itemBelow</a></b> ( const QTreeWidgetItem * <i>item</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWidget * </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#itemWidget">itemWidget</a></b> ( QTreeWidgetItem * <i>item</i>, int <i>column</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#openPersistentEditor">openPersistentEditor</a></b> ( QTreeWidgetItem * <i>item</i>, int <i>column</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#removeItemWidget">removeItemWidget</a></b> ( QTreeWidgetItem * <i>item</i>, int <i>column</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QTreeWidgetItem *&gt; </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#selectedItems">selectedItems</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#columnCount-prop">setColumnCount</a></b> ( int <i>columns</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#setCurrentItem">setCurrentItem</a></b> ( QTreeWidgetItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#setCurrentItem-2">setCurrentItem</a></b> ( QTreeWidgetItem * <i>item</i>, int <i>column</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#setCurrentItem-3">setCurrentItem</a></b> ( QTreeWidgetItem * <i>item</i>, int <i>column</i>, QItemSelectionModel::SelectionFlags <i>command</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#setFirstItemColumnSpanned">setFirstItemColumnSpanned</a></b> ( const QTreeWidgetItem * <i>item</i>, bool <i>span</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#setHeaderItem">setHeaderItem</a></b> ( QTreeWidgetItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#setHeaderLabel">setHeaderLabel</a></b> ( const QString &amp; <i>label</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#setHeaderLabels">setHeaderLabels</a></b> ( const QStringList &amp; <i>labels</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#setItemWidget">setItemWidget</a></b> ( QTreeWidgetItem * <i>item</i>, int <i>column</i>, QWidget * <i>widget</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#sortColumn">sortColumn</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#sortItems">sortItems</a></b> ( int <i>column</i>, Qt::SortOrder <i>order</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTreeWidgetItem * </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#takeTopLevelItem">takeTopLevelItem</a></b> ( int <i>index</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTreeWidgetItem * </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#topLevelItem">topLevelItem</a></b> ( int <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#topLevelItemCount-prop">topLevelItemCount</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRect </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#visualItemRect">visualItemRect</a></b> ( const QTreeWidgetItem * <i>item</i> ) const</td></tr>
</table>
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#setSelectionModel">setSelectionModel</a></b> ( QItemSelectionModel * <i>selectionModel</i> )</td></tr>
</table>
<ul>
<li class="fn">49 public functions inherited from <a href="qtreeview.html#public-functions">QTreeView</a></li>
<li class="fn">57 public functions inherited from <a href="qabstractitemview.html#public-functions">QAbstractItemView</a></li>
<li class="fn">17 public functions inherited from <a href="qabstractscrollarea.html#public-functions">QAbstractScrollArea</a></li>
<li class="fn">14 public functions inherited from <a href="qframe.html#public-functions">QFrame</a></li>
<li class="fn">221 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li class="fn">13 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#clear">clear</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#collapseItem">collapseItem</a></b> ( const QTreeWidgetItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#expandItem">expandItem</a></b> ( const QTreeWidgetItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#scrollToItem">scrollToItem</a></b> ( const QTreeWidgetItem * <i>item</i>, QAbstractItemView::ScrollHint <i>hint</i> = EnsureVisible )</td></tr>
</table>
<ul>
<li class="fn">8 public slots inherited from <a href="qtreeview.html#public-slots">QTreeView</a></li>
<li class="fn">9 public slots inherited from <a href="qabstractitemview.html#public-slots">QAbstractItemView</a></li>
<li class="fn">19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#currentItemChanged">currentItemChanged</a></b> ( QTreeWidgetItem * <i>current</i>, QTreeWidgetItem * <i>previous</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#itemActivated">itemActivated</a></b> ( QTreeWidgetItem * <i>item</i>, int <i>column</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#itemChanged">itemChanged</a></b> ( QTreeWidgetItem * <i>item</i>, int <i>column</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#itemClicked">itemClicked</a></b> ( QTreeWidgetItem * <i>item</i>, int <i>column</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#itemCollapsed">itemCollapsed</a></b> ( QTreeWidgetItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#itemDoubleClicked">itemDoubleClicked</a></b> ( QTreeWidgetItem * <i>item</i>, int <i>column</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#itemEntered">itemEntered</a></b> ( QTreeWidgetItem * <i>item</i>, int <i>column</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#itemExpanded">itemExpanded</a></b> ( QTreeWidgetItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#itemPressed">itemPressed</a></b> ( QTreeWidgetItem * <i>item</i>, int <i>column</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#itemSelectionChanged">itemSelectionChanged</a></b> ()</td></tr>
</table>
<ul>
<li class="fn">2 signals inherited from <a href="qtreeview.html#signals">QTreeView</a></li>
<li class="fn">6 signals inherited from <a href="qabstractitemview.html#signals">QAbstractItemView</a></li>
<li class="fn">1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#dropMimeData">dropMimeData</a></b> ( QTreeWidgetItem * <i>parent</i>, int <i>index</i>, const QMimeData * <i>data</i>, Qt::DropAction <i>action</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QModelIndex </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#indexFromItem">indexFromItem</a></b> ( QTreeWidgetItem * <i>item</i>, int <i>column</i> = 0 ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTreeWidgetItem * </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#itemFromIndex">itemFromIndex</a></b> ( const QModelIndex &amp; <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QMimeData * </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#mimeData">mimeData</a></b> ( const QList&lt;QTreeWidgetItem *&gt; <i>items</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QStringList </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#mimeTypes">mimeTypes</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual Qt::DropActions </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#supportedDropActions">supportedDropActions</a></b> () const</td></tr>
</table>
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#dropEvent">dropEvent</a></b> ( QDropEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qtreewidget.html#event">event</a></b> ( QEvent * <i>e</i> )</td></tr>
</table>
<ul>
<li class="fn">28 protected functions inherited from <a href="qtreeview.html#protected-functions">QTreeView</a></li>
<li class="fn">36 protected functions inherited from <a href="qabstractitemview.html#protected-functions">QAbstractItemView</a></li>
<li class="fn">18 protected functions inherited from <a href="qabstractscrollarea.html#protected-functions">QAbstractScrollArea</a></li>
<li class="fn">3 protected functions inherited from <a href="qframe.html#protected-functions">QFrame</a></li>
<li class="fn">37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li class="fn">1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li class="fn">4 protected slots inherited from <a href="qtreeview.html#protected-slots">QTreeView</a></li>
<li class="fn">9 protected slots inherited from <a href="qabstractitemview.html#protected-slots">QAbstractItemView</a></li>
<li class="fn">1 protected slot inherited from <a href="qabstractscrollarea.html#protected-slots">QAbstractScrollArea</a></li>
<li class="fn">1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<a name="details"></a>
<!-- $$$QTreeWidget-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QTreeWidget class provides a tree view that uses a predefined tree model.</p>
<p>The QTreeWidget class is a convenience class that provides a standard tree widget with a classic item-based interface similar to that used by the <a href="qlistview.html">QListView</a> class in Qt 3. This class is based on Qt's Model/View architecture and uses a default model to hold items, each of which is a <a href="qtreewidgetitem.html">QTreeWidgetItem</a>.</p>
<p>Developers who do not need the flexibility of the Model/View framework can use this class to create simple hierarchical lists very easily. A more flexible approach involves combining a <a href="qtreeview.html">QTreeView</a> with a standard item model. This allows the storage of data to be separated from its representation.</p>
<p>In its simplest form, a tree widget can be constructed in the following way:</p>
<pre class="cpp"> <span class="type">QTreeWidget</span> <span class="operator">*</span>treeWidget <span class="operator">=</span> <span class="keyword">new</span> <span class="type">QTreeWidget</span>();
 treeWidget<span class="operator">-</span><span class="operator">&gt;</span><a href="qtreewidget.html#columnCount-prop">setColumnCount</a>(<span class="number">1</span>);
 <span class="type"><a href="qlist.html">QList</a></span><span class="operator">&lt;</span><span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> <span class="operator">*</span><span class="operator">&gt;</span> items;
 <span class="keyword">for</span> (<span class="type">int</span> i <span class="operator">=</span> <span class="number">0</span>; i <span class="operator">&lt;</span> <span class="number">10</span>; <span class="operator">+</span><span class="operator">+</span>i)
     items<span class="operator">.</span>append(<span class="keyword">new</span> <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span>((<span class="type">QTreeWidget</span><span class="operator">*</span>)<span class="number">0</span><span class="operator">,</span> <span class="type"><a href="qstringlist.html">QStringList</a></span>(<span class="type"><a href="qstring.html">QString</a></span>(<span class="string">&quot;item: %1&quot;</span>)<span class="operator">.</span>arg(i))));
 treeWidget<span class="operator">-</span><span class="operator">&gt;</span><a href="qtreewidget.html#insertTopLevelItems">insertTopLevelItems</a>(<span class="number">0</span><span class="operator">,</span> items);</pre>
<p>Before items can be added to the tree widget, the number of columns must be set with <a href="qtreewidget.html#columnCount-prop">setColumnCount</a>(). This allows each item to have one or more labels or other decorations. The number of columns in use can be found with the <a href="qtreewidget.html#columnCount-prop">columnCount</a>() function.</p>
<p>The tree can have a header that contains a section for each column in the widget. It is easiest to set up the labels for each section by supplying a list of strings with <a href="qtreewidget.html#setHeaderLabels">setHeaderLabels</a>(), but a custom header can be constructed with a <a href="qtreewidgetitem.html">QTreeWidgetItem</a> and inserted into the tree with the <a href="qtreewidget.html#setHeaderItem">setHeaderItem</a>() function.</p>
<p>The items in the tree can be sorted by column according to a predefined sort order. If sorting is enabled, the user can sort the items by clicking on a column header. Sorting can be enabled or disabled by calling <a href="qtreeview.html#sortingEnabled-prop">setSortingEnabled()</a>. The <a href="qtreeview.html#sortingEnabled-prop">isSortingEnabled()</a> function indicates whether sorting is enabled.</p>
<table class="generic" width="100%">
 <tr valign="top" class="odd"><td ><img src="images/windowsxp-treeview.png" alt="Screenshot of a Windows XP style tree widget" /></td><td ><img src="images/macintosh-treeview.png" alt="Screenshot of a Macintosh style tree widget" /></td><td ><img src="images/plastique-treeview.png" alt="Screenshot of a Plastique style tree widget" /></td></tr>
<tr valign="top" class="even"><td >A <a href="gallery-windowsxp.html">Windows XP style</a> tree widget.</td><td >A <a href="gallery-macintosh.html">Macintosh style</a> tree widget.</td><td >A <a href="gallery-plastique.html">Plastique style</a> tree widget.</td></tr>
</table>
</div>
<p><b>See also </b><a href="qtreewidgetitem.html">QTreeWidgetItem</a>, <a href="qtreewidgetitemiterator.html">QTreeWidgetItemIterator</a>, <a href="qtreeview.html">QTreeView</a>, <a href="model-view-programming.html">Model/View Programming</a>, and <a href="tools-settingseditor.html">Settings Editor Example</a>.</p>
<!-- @@@QTreeWidget -->
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$columnCount-prop$$$columnCount$$$setColumnCountint -->
<h3 class="fn"><a name="columnCount-prop"></a><span class="name">columnCount</span> : <span class="type">int</span></h3>
<p>This property holds the number of columns displayed in the tree widget.</p>
<p>By default, this property has a value of 1.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>columnCount</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setColumnCount</b></span> ( int <i>columns</i> )</td></tr>
</table>
<!-- @@@columnCount -->
<!-- $$$topLevelItemCount-prop$$$topLevelItemCount -->
<h3 class="fn"><a name="topLevelItemCount-prop"></a><span class="name">topLevelItemCount</span> : const <span class="type">int</span></h3>
<p>This property holds the number of top-level items.</p>
<p>By default, this property has a value of 0.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>topLevelItemCount</b></span> () const</td></tr>
</table>
<p><b>See also </b><a href="qtreewidget.html#columnCount-prop">columnCount</a>() and <a href="qtreewidget.html#currentItem">currentItem</a>().</p>
<!-- @@@topLevelItemCount -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QTreeWidget[overload1]$$$QTreeWidgetQWidget* -->
<h3 class="fn"><a name="QTreeWidget"></a>QTreeWidget::<span class="name">QTreeWidget</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs a tree widget with the given <i>parent</i>.</p>
<!-- @@@QTreeWidget -->
<!-- $$$~QTreeWidget[overload1]$$$~QTreeWidget -->
<h3 class="fn"><a name="dtor.QTreeWidget"></a>QTreeWidget::<span class="name">~QTreeWidget</span> ()</h3>
<p>Destroys the tree widget and all its items.</p>
<!-- @@@~QTreeWidget -->
<!-- $$$addTopLevelItem[overload1]$$$addTopLevelItemQTreeWidgetItem* -->
<h3 class="fn"><a name="addTopLevelItem"></a><span class="type">void</span> QTreeWidget::<span class="name">addTopLevelItem</span> ( <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i> )</h3>
<p>Appends the <i>item</i> as a top-level item in the widget.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qtreewidget.html#insertTopLevelItem">insertTopLevelItem</a>().</p>
<!-- @@@addTopLevelItem -->
<!-- $$$addTopLevelItems[overload1]$$$addTopLevelItemsconstQList<QTreeWidgetItem*>& -->
<h3 class="fn"><a name="addTopLevelItems"></a><span class="type">void</span> QTreeWidget::<span class="name">addTopLevelItems</span> ( const <span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> *&gt; &amp; <i>items</i> )</h3>
<p>Appends the list of <i>items</i> as a top-level items in the widget.</p>
<p><b>See also </b><a href="qtreewidget.html#insertTopLevelItems">insertTopLevelItems</a>().</p>
<!-- @@@addTopLevelItems -->
<!-- $$$clear[overload1]$$$clear -->
<h3 class="fn"><a name="clear"></a><span class="type">void</span> QTreeWidget::<span class="name">clear</span> ()<tt> [slot]</tt></h3>
<p>Clears the tree widget by removing all of its items and selections.</p>
<p><b>Note:</b> Since each item is removed from the tree widget before being deleted, the return value of <a href="qtreewidgetitem.html#treeWidget">QTreeWidgetItem::treeWidget</a>() will be invalid when called from an item's destructor.</p>
<p><b>See also </b><a href="qtreewidget.html#takeTopLevelItem">takeTopLevelItem</a>(), <a href="qtreewidget.html#topLevelItemCount-prop">topLevelItemCount</a>(), and <a href="qtreewidget.html#columnCount-prop">columnCount</a>().</p>
<!-- @@@clear -->
<!-- $$$closePersistentEditor[overload1]$$$closePersistentEditorQTreeWidgetItem*int -->
<h3 class="fn"><a name="closePersistentEditor"></a><span class="type">void</span> QTreeWidget::<span class="name">closePersistentEditor</span> ( <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i>, <span class="type">int</span> <i>column</i> = 0 )</h3>
<p>Closes the persistent editor for the <i>item</i> in the given <i>column</i>.</p>
<p>This function has no effect if no persistent editor is open for this combination of item and column.</p>
<p><b>See also </b><a href="qtreewidget.html#openPersistentEditor">openPersistentEditor</a>().</p>
<!-- @@@closePersistentEditor -->
<!-- $$$collapseItem[overload1]$$$collapseItemconstQTreeWidgetItem* -->
<h3 class="fn"><a name="collapseItem"></a><span class="type">void</span> QTreeWidget::<span class="name">collapseItem</span> ( const <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i> )<tt> [slot]</tt></h3>
<p>Closes the <i>item</i>. This causes the tree containing the item's children to be collapsed.</p>
<p><b>See also </b><a href="qtreewidget.html#expandItem">expandItem</a>(), <a href="qtreewidget.html#currentItem">currentItem</a>(), <a href="qtreewidget.html#itemAt">itemAt</a>(), and <a href="qtreewidget.html#topLevelItem">topLevelItem</a>().</p>
<!-- @@@collapseItem -->
<!-- $$$currentColumn[overload1]$$$currentColumn -->
<h3 class="fn"><a name="currentColumn"></a><span class="type">int</span> QTreeWidget::<span class="name">currentColumn</span> () const</h3>
<p>Returns the current column in the tree widget.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qtreewidget.html#setCurrentItem">setCurrentItem</a>() and <a href="qtreewidget.html#columnCount-prop">columnCount</a>().</p>
<!-- @@@currentColumn -->
<!-- $$$currentItem[overload1]$$$currentItem -->
<h3 class="fn"><a name="currentItem"></a><span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * QTreeWidget::<span class="name">currentItem</span> () const</h3>
<p>Returns the current item in the tree widget.</p>
<p><b>See also </b><a href="qtreewidget.html#setCurrentItem">setCurrentItem</a>() and <a href="qtreewidget.html#currentItemChanged">currentItemChanged</a>().</p>
<!-- @@@currentItem -->
<!-- $$$currentItemChanged[overload1]$$$currentItemChangedQTreeWidgetItem*QTreeWidgetItem* -->
<h3 class="fn"><a name="currentItemChanged"></a><span class="type">void</span> QTreeWidget::<span class="name">currentItemChanged</span> ( <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>current</i>, <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>previous</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the current item changes. The current item is specified by <i>current</i>, and this replaces the <i>previous</i> current item.</p>
<p><b>See also </b><a href="qtreewidget.html#setCurrentItem">setCurrentItem</a>().</p>
<!-- @@@currentItemChanged -->
<!-- $$$dropEvent[overload1]$$$dropEventQDropEvent* -->
<h3 class="fn"><a name="dropEvent"></a><span class="type">void</span> QTreeWidget::<span class="name">dropEvent</span> ( <span class="type"><a href="qdropevent.html">QDropEvent</a></span> * <i>event</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#dropEvent">QWidget::dropEvent</a>().</p>
<!-- @@@dropEvent -->
<!-- $$$dropMimeData[overload1]$$$dropMimeDataQTreeWidgetItem*intconstQMimeData*Qt::DropAction -->
<h3 class="fn"><a name="dropMimeData"></a><span class="type">bool</span> QTreeWidget::<span class="name">dropMimeData</span> ( <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>parent</i>, <span class="type">int</span> <i>index</i>, const <span class="type"><a href="qmimedata.html">QMimeData</a></span> * <i>data</i>, <span class="type"><a href="qt.html#DropAction-enum">Qt::DropAction</a></span> <i>action</i> )<tt> [virtual protected]</tt></h3>
<p>Handles the <i>data</i> supplied by a drag and drop operation that ended with the given <i>action</i> in the <i>index</i> in the given <i>parent</i> item.</p>
<p>The default implementation returns true if the drop was successfully handled by decoding the mime data and inserting it into the model; otherwise it returns false.</p>
<p><b>See also </b><a href="qtreewidget.html#supportedDropActions">supportedDropActions</a>().</p>
<!-- @@@dropMimeData -->
<!-- $$$editItem[overload1]$$$editItemQTreeWidgetItem*int -->
<h3 class="fn"><a name="editItem"></a><span class="type">void</span> QTreeWidget::<span class="name">editItem</span> ( <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i>, <span class="type">int</span> <i>column</i> = 0 )</h3>
<p>Starts editing the <i>item</i> in the given <i>column</i> if it is editable.</p>
<!-- @@@editItem -->
<!-- $$$event[overload1]$$$eventQEvent* -->
<h3 class="fn"><a name="event"></a><span class="type">bool</span> QTreeWidget::<span class="name">event</span> ( <span class="type"><a href="qevent.html">QEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#event">QObject::event</a>().</p>
<!-- @@@event -->
<!-- $$$expandItem[overload1]$$$expandItemconstQTreeWidgetItem* -->
<h3 class="fn"><a name="expandItem"></a><span class="type">void</span> QTreeWidget::<span class="name">expandItem</span> ( const <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i> )<tt> [slot]</tt></h3>
<p>Expands the <i>item</i>. This causes the tree containing the item's children to be expanded.</p>
<p><b>See also </b><a href="qtreewidget.html#collapseItem">collapseItem</a>(), <a href="qtreewidget.html#currentItem">currentItem</a>(), <a href="qtreewidget.html#itemAt">itemAt</a>(), <a href="qtreewidget.html#topLevelItem">topLevelItem</a>(), and <a href="qtreewidget.html#itemExpanded">itemExpanded</a>().</p>
<!-- @@@expandItem -->
<!-- $$$findItems[overload1]$$$findItemsconstQString&Qt::MatchFlagsint -->
<h3 class="fn"><a name="findItems"></a><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> *&gt; QTreeWidget::<span class="name">findItems</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i>, <span class="type"><a href="qt.html#MatchFlag-enum">Qt::MatchFlags</a></span> <i>flags</i>, <span class="type">int</span> <i>column</i> = 0 ) const</h3>
<p>Returns a list of items that match the given <i>text</i>, using the given <i>flags</i>, in the given <i>column</i>.</p>
<!-- @@@findItems -->
<!-- $$$headerItem[overload1]$$$headerItem -->
<h3 class="fn"><a name="headerItem"></a><span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * QTreeWidget::<span class="name">headerItem</span> () const</h3>
<p>Returns the item used for the tree widget's header.</p>
<p><b>See also </b><a href="qtreewidget.html#setHeaderItem">setHeaderItem</a>().</p>
<!-- @@@headerItem -->
<!-- $$$indexFromItem[overload1]$$$indexFromItemQTreeWidgetItem*int -->
<h3 class="fn"><a name="indexFromItem"></a><span class="type"><a href="qmodelindex.html">QModelIndex</a></span> QTreeWidget::<span class="name">indexFromItem</span> ( <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i>, <span class="type">int</span> <i>column</i> = 0 ) const<tt> [protected]</tt></h3>
<p>Returns the <a href="qmodelindex.html">QModelIndex</a> assocated with the given <i>item</i> in the given <i>column</i>.</p>
<p><b>See also </b><a href="qtreewidget.html#itemFromIndex">itemFromIndex</a>() and <a href="qtreewidget.html#topLevelItem">topLevelItem</a>().</p>
<!-- @@@indexFromItem -->
<!-- $$$indexOfTopLevelItem[overload1]$$$indexOfTopLevelItemQTreeWidgetItem* -->
<h3 class="fn"><a name="indexOfTopLevelItem"></a><span class="type">int</span> QTreeWidget::<span class="name">indexOfTopLevelItem</span> ( <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i> ) const</h3>
<p>Returns the index of the given top-level <i>item</i>, or -1 if the item cannot be found.</p>
<p><b>See also </b><a href="qtreewidget.html#sortItems">sortItems</a>() and <a href="qtreewidget.html#topLevelItemCount-prop">topLevelItemCount</a>().</p>
<!-- @@@indexOfTopLevelItem -->
<!-- $$$insertTopLevelItem[overload1]$$$insertTopLevelItemintQTreeWidgetItem* -->
<h3 class="fn"><a name="insertTopLevelItem"></a><span class="type">void</span> QTreeWidget::<span class="name">insertTopLevelItem</span> ( <span class="type">int</span> <i>index</i>, <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i> )</h3>
<p>Inserts the <i>item</i> at <i>index</i> in the top level in the view.</p>
<p>If the item has already been inserted somewhere else it wont be inserted.</p>
<p><b>See also </b><a href="qtreewidget.html#addTopLevelItem">addTopLevelItem</a>() and <a href="qtreewidget.html#columnCount-prop">columnCount</a>().</p>
<!-- @@@insertTopLevelItem -->
<!-- $$$insertTopLevelItems[overload1]$$$insertTopLevelItemsintconstQList<QTreeWidgetItem*>& -->
<h3 class="fn"><a name="insertTopLevelItems"></a><span class="type">void</span> QTreeWidget::<span class="name">insertTopLevelItems</span> ( <span class="type">int</span> <i>index</i>, const <span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> *&gt; &amp; <i>items</i> )</h3>
<p>Inserts the list of <i>items</i> at <i>index</i> in the top level in the view.</p>
<p>Items that have already been inserted somewhere else wont be inserted.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qtreewidget.html#addTopLevelItems">addTopLevelItems</a>().</p>
<!-- @@@insertTopLevelItems -->
<!-- $$$invisibleRootItem[overload1]$$$invisibleRootItem -->
<h3 class="fn"><a name="invisibleRootItem"></a><span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * QTreeWidget::<span class="name">invisibleRootItem</span> () const</h3>
<p>Returns the tree widget's invisible root item.</p>
<p>The invisible root item provides access to the tree widget's top-level items through the <a href="qtreewidgetitem.html">QTreeWidgetItem</a> API, making it possible to write functions that can treat top-level items and their children in a uniform way; for example, recursive functions.</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@invisibleRootItem -->
<!-- $$$isFirstItemColumnSpanned[overload1]$$$isFirstItemColumnSpannedconstQTreeWidgetItem* -->
<h3 class="fn"><a name="isFirstItemColumnSpanned"></a><span class="type">bool</span> QTreeWidget::<span class="name">isFirstItemColumnSpanned</span> ( const <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i> ) const</h3>
<p>Returns true if the given <i>item</i> is set to show only one section over all columns; otherwise returns false.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also </b><a href="qtreewidget.html#setFirstItemColumnSpanned">setFirstItemColumnSpanned</a>().</p>
<!-- @@@isFirstItemColumnSpanned -->
<!-- $$$itemAbove[overload1]$$$itemAboveconstQTreeWidgetItem* -->
<h3 class="fn"><a name="itemAbove"></a><span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * QTreeWidget::<span class="name">itemAbove</span> ( const <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i> ) const</h3>
<p>Returns the item above the given <i>item</i>.</p>
<p>This function was introduced in Qt 4.3.</p>
<!-- @@@itemAbove -->
<!-- $$$itemActivated[overload1]$$$itemActivatedQTreeWidgetItem*int -->
<h3 class="fn"><a name="itemActivated"></a><span class="type">void</span> QTreeWidget::<span class="name">itemActivated</span> ( <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i>, <span class="type">int</span> <i>column</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the user activates an item by single- or double-clicking (depending on the platform, i.e&#x2e; on the <a href="qstyle.html#StyleHint-enum">QStyle::SH_ItemView_ActivateItemOnSingleClick</a> style hint) or pressing a special key (e.g&#x2e;, <b>Enter</b>).</p>
<p>The specified <i>item</i> is the item that was clicked, or 0 if no item was clicked. The <i>column</i> is the item's column that was clicked, or -1 if no item was clicked.</p>
<!-- @@@itemActivated -->
<!-- $$$itemAt[overload1]$$$itemAtconstQPoint& -->
<h3 class="fn"><a name="itemAt"></a><span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * QTreeWidget::<span class="name">itemAt</span> ( const <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>p</i> ) const</h3>
<p>Returns a pointer to the item at the coordinates <i>p</i>. The coordinates are relative to the tree widget's <a href="qabstractscrollarea.html#viewport">viewport()</a>.</p>
<p><b>See also </b><a href="qtreewidget.html#visualItemRect">visualItemRect</a>().</p>
<!-- @@@itemAt -->
<!-- $$$itemAt$$$itemAtintint -->
<h3 class="fn"><a name="itemAt-2"></a><span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * QTreeWidget::<span class="name">itemAt</span> ( <span class="type">int</span> <i>x</i>, <span class="type">int</span> <i>y</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>Returns a pointer to the item at the coordinates (<i>x</i>, <i>y</i>). The coordinates are relative to the tree widget's <a href="qabstractscrollarea.html#viewport">viewport()</a>.</p>
<!-- @@@itemAt -->
<!-- $$$itemBelow[overload1]$$$itemBelowconstQTreeWidgetItem* -->
<h3 class="fn"><a name="itemBelow"></a><span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * QTreeWidget::<span class="name">itemBelow</span> ( const <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i> ) const</h3>
<p>Returns the item visually below the given <i>item</i>.</p>
<p>This function was introduced in Qt 4.3.</p>
<!-- @@@itemBelow -->
<!-- $$$itemChanged[overload1]$$$itemChangedQTreeWidgetItem*int -->
<h3 class="fn"><a name="itemChanged"></a><span class="type">void</span> QTreeWidget::<span class="name">itemChanged</span> ( <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i>, <span class="type">int</span> <i>column</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the contents of the <i>column</i> in the specified <i>item</i> changes.</p>
<!-- @@@itemChanged -->
<!-- $$$itemClicked[overload1]$$$itemClickedQTreeWidgetItem*int -->
<h3 class="fn"><a name="itemClicked"></a><span class="type">void</span> QTreeWidget::<span class="name">itemClicked</span> ( <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i>, <span class="type">int</span> <i>column</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the user clicks inside the widget.</p>
<p>The specified <i>item</i> is the item that was clicked. The <i>column</i> is the item's column that was clicked. If no item was clicked, no signal will be emitted.</p>
<!-- @@@itemClicked -->
<!-- $$$itemCollapsed[overload1]$$$itemCollapsedQTreeWidgetItem* -->
<h3 class="fn"><a name="itemCollapsed"></a><span class="type">void</span> QTreeWidget::<span class="name">itemCollapsed</span> ( <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the specified <i>item</i> is collapsed so that none of its children are displayed.</p>
<p><b>Note:</b> This signal will not be emitted if an item changes its state when <a href="qtreeview.html#collapseAll">collapseAll</a>() is invoked.</p>
<p><b>See also </b><a href="qtreewidgetitem.html#isExpanded">QTreeWidgetItem::isExpanded</a>(), <a href="qtreewidget.html#itemExpanded">itemExpanded</a>(), and <a href="qtreewidget.html#collapseItem">collapseItem</a>().</p>
<!-- @@@itemCollapsed -->
<!-- $$$itemDoubleClicked[overload1]$$$itemDoubleClickedQTreeWidgetItem*int -->
<h3 class="fn"><a name="itemDoubleClicked"></a><span class="type">void</span> QTreeWidget::<span class="name">itemDoubleClicked</span> ( <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i>, <span class="type">int</span> <i>column</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the user double clicks inside the widget.</p>
<p>The specified <i>item</i> is the item that was clicked, or 0 if no item was clicked. The <i>column</i> is the item's column that was clicked. If no item was double clicked, no signal will be emitted.</p>
<!-- @@@itemDoubleClicked -->
<!-- $$$itemEntered[overload1]$$$itemEnteredQTreeWidgetItem*int -->
<h3 class="fn"><a name="itemEntered"></a><span class="type">void</span> QTreeWidget::<span class="name">itemEntered</span> ( <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i>, <span class="type">int</span> <i>column</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the mouse cursor enters an <i>item</i> over the specified <i>column</i>. <a href="qtreewidget.html">QTreeWidget</a> mouse tracking needs to be enabled for this feature to work.</p>
<!-- @@@itemEntered -->
<!-- $$$itemExpanded[overload1]$$$itemExpandedQTreeWidgetItem* -->
<h3 class="fn"><a name="itemExpanded"></a><span class="type">void</span> QTreeWidget::<span class="name">itemExpanded</span> ( <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the specified <i>item</i> is expanded so that all of its children are displayed.</p>
<p><b>Note:</b> This signal will not be emitted if an item changes its state when <a href="qtreeview.html#expandAll">expandAll</a>() is invoked.</p>
<p><b>See also </b><a href="qtreewidget-obsolete.html#setItemExpanded" class="obsolete">setItemExpanded</a>(), <a href="qtreewidgetitem.html#isExpanded">QTreeWidgetItem::isExpanded</a>(), <a href="qtreewidget.html#itemCollapsed">itemCollapsed</a>(), and <a href="qtreewidget.html#expandItem">expandItem</a>().</p>
<!-- @@@itemExpanded -->
<!-- $$$itemFromIndex[overload1]$$$itemFromIndexconstQModelIndex& -->
<h3 class="fn"><a name="itemFromIndex"></a><span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * QTreeWidget::<span class="name">itemFromIndex</span> ( const <span class="type"><a href="qmodelindex.html">QModelIndex</a></span> &amp; <i>index</i> ) const<tt> [protected]</tt></h3>
<p>Returns a pointer to the <a href="qtreewidgetitem.html">QTreeWidgetItem</a> assocated with the given <i>index</i>.</p>
<p><b>See also </b><a href="qtreewidget.html#indexFromItem">indexFromItem</a>().</p>
<!-- @@@itemFromIndex -->
<!-- $$$itemPressed[overload1]$$$itemPressedQTreeWidgetItem*int -->
<h3 class="fn"><a name="itemPressed"></a><span class="type">void</span> QTreeWidget::<span class="name">itemPressed</span> ( <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i>, <span class="type">int</span> <i>column</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the user presses a mouse button inside the widget.</p>
<p>The specified <i>item</i> is the item that was clicked, or 0 if no item was clicked. The <i>column</i> is the item's column that was clicked, or -1 if no item was clicked.</p>
<!-- @@@itemPressed -->
<!-- $$$itemSelectionChanged[overload1]$$$itemSelectionChanged -->
<h3 class="fn"><a name="itemSelectionChanged"></a><span class="type">void</span> QTreeWidget::<span class="name">itemSelectionChanged</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted when the selection changes in the tree widget. The current selection can be found with <a href="qtreewidget.html#selectedItems">selectedItems</a>().</p>
<!-- @@@itemSelectionChanged -->
<!-- $$$itemWidget[overload1]$$$itemWidgetQTreeWidgetItem*int -->
<h3 class="fn"><a name="itemWidget"></a><span class="type"><a href="qwidget.html">QWidget</a></span> * QTreeWidget::<span class="name">itemWidget</span> ( <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i>, <span class="type">int</span> <i>column</i> ) const</h3>
<p>Returns the widget displayed in the cell specified by <i>item</i> and the given <i>column</i>.</p>
<p><b>Note:</b> The tree takes ownership of the widget.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qtreewidget.html#setItemWidget">setItemWidget</a>().</p>
<!-- @@@itemWidget -->
<!-- $$$mimeData[overload1]$$$mimeDataconstQList<QTreeWidgetItem*> -->
<h3 class="fn"><a name="mimeData"></a><span class="type"><a href="qmimedata.html">QMimeData</a></span> * QTreeWidget::<span class="name">mimeData</span> ( const <span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> *&gt; <i>items</i> ) const<tt> [virtual protected]</tt></h3>
<p>Returns an object that contains a serialized description of the specified <i>items</i>. The format used to describe the items is obtained from the <a href="qtreewidget.html#mimeTypes">mimeTypes</a>() function.</p>
<p>If the list of items is empty, 0 is returned rather than a serialized empty list.</p>
<!-- @@@mimeData -->
<!-- $$$mimeTypes[overload1]$$$mimeTypes -->
<h3 class="fn"><a name="mimeTypes"></a><span class="type"><a href="qstringlist.html">QStringList</a></span> QTreeWidget::<span class="name">mimeTypes</span> () const<tt> [virtual protected]</tt></h3>
<p>Returns a list of MIME types that can be used to describe a list of treewidget items.</p>
<p><b>See also </b><a href="qtreewidget.html#mimeData">mimeData</a>().</p>
<!-- @@@mimeTypes -->
<!-- $$$openPersistentEditor[overload1]$$$openPersistentEditorQTreeWidgetItem*int -->
<h3 class="fn"><a name="openPersistentEditor"></a><span class="type">void</span> QTreeWidget::<span class="name">openPersistentEditor</span> ( <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i>, <span class="type">int</span> <i>column</i> = 0 )</h3>
<p>Opens a persistent editor for the <i>item</i> in the given <i>column</i>.</p>
<p><b>See also </b><a href="qtreewidget.html#closePersistentEditor">closePersistentEditor</a>().</p>
<!-- @@@openPersistentEditor -->
<!-- $$$removeItemWidget[overload1]$$$removeItemWidgetQTreeWidgetItem*int -->
<h3 class="fn"><a name="removeItemWidget"></a><span class="type">void</span> QTreeWidget::<span class="name">removeItemWidget</span> ( <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i>, <span class="type">int</span> <i>column</i> )</h3>
<p>Removes the widget set in the given <i>item</i> in the given <i>column</i>.</p>
<p>This function was introduced in Qt 4.3.</p>
<!-- @@@removeItemWidget -->
<!-- $$$scrollToItem[overload1]$$$scrollToItemconstQTreeWidgetItem*QAbstractItemView::ScrollHint -->
<h3 class="fn"><a name="scrollToItem"></a><span class="type">void</span> QTreeWidget::<span class="name">scrollToItem</span> ( const <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i>, <span class="type"><a href="qabstractitemview.html#ScrollHint-enum">QAbstractItemView::ScrollHint</a></span> <i>hint</i> = EnsureVisible )<tt> [slot]</tt></h3>
<p>Ensures that the <i>item</i> is visible, scrolling the view if necessary using the specified <i>hint</i>.</p>
<p><b>See also </b><a href="qtreewidget.html#currentItem">currentItem</a>(), <a href="qtreewidget.html#itemAt">itemAt</a>(), and <a href="qtreewidget.html#topLevelItem">topLevelItem</a>().</p>
<!-- @@@scrollToItem -->
<!-- $$$selectedItems[overload1]$$$selectedItems -->
<h3 class="fn"><a name="selectedItems"></a><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> *&gt; QTreeWidget::<span class="name">selectedItems</span> () const</h3>
<p>Returns a list of all selected non-hidden items.</p>
<p><b>See also </b><a href="qtreewidget.html#itemSelectionChanged">itemSelectionChanged</a>().</p>
<!-- @@@selectedItems -->
<!-- $$$setCurrentItem[overload1]$$$setCurrentItemQTreeWidgetItem* -->
<h3 class="fn"><a name="setCurrentItem"></a><span class="type">void</span> QTreeWidget::<span class="name">setCurrentItem</span> ( <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i> )</h3>
<p>Sets the current <i>item</i> in the tree widget.</p>
<p>Unless the selection mode is <a href="qabstractitemview.html#SelectionMode-enum">NoSelection</a>, the item is also be selected.</p>
<p><b>See also </b><a href="qtreewidget.html#currentItem">currentItem</a>() and <a href="qtreewidget.html#currentItemChanged">currentItemChanged</a>().</p>
<!-- @@@setCurrentItem -->
<!-- $$$setCurrentItem$$$setCurrentItemQTreeWidgetItem*int -->
<h3 class="fn"><a name="setCurrentItem-2"></a><span class="type">void</span> QTreeWidget::<span class="name">setCurrentItem</span> ( <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i>, <span class="type">int</span> <i>column</i> )</h3>
<p>Sets the current <i>item</i> in the tree widget and the current column to <i>column</i>.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qtreewidget.html#currentItem">currentItem</a>().</p>
<!-- @@@setCurrentItem -->
<!-- $$$setCurrentItem$$$setCurrentItemQTreeWidgetItem*intQItemSelectionModel::SelectionFlags -->
<h3 class="fn"><a name="setCurrentItem-3"></a><span class="type">void</span> QTreeWidget::<span class="name">setCurrentItem</span> ( <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i>, <span class="type">int</span> <i>column</i>, <span class="type"><a href="qitemselectionmodel.html#SelectionFlag-enum">QItemSelectionModel::SelectionFlags</a></span> <i>command</i> )</h3>
<p>Sets the current <i>item</i> in the tree widget and the current column to <i>column</i>, using the given <i>command</i>.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qtreewidget.html#currentItem">currentItem</a>().</p>
<!-- @@@setCurrentItem -->
<!-- $$$setFirstItemColumnSpanned[overload1]$$$setFirstItemColumnSpannedconstQTreeWidgetItem*bool -->
<h3 class="fn"><a name="setFirstItemColumnSpanned"></a><span class="type">void</span> QTreeWidget::<span class="name">setFirstItemColumnSpanned</span> ( const <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i>, <span class="type">bool</span> <i>span</i> )</h3>
<p>Sets the given <i>item</i> to only show one section for all columns if <i>span</i> is true; otherwise the item will show one section per column.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also </b><a href="qtreewidget.html#isFirstItemColumnSpanned">isFirstItemColumnSpanned</a>().</p>
<!-- @@@setFirstItemColumnSpanned -->
<!-- $$$setHeaderItem[overload1]$$$setHeaderItemQTreeWidgetItem* -->
<h3 class="fn"><a name="setHeaderItem"></a><span class="type">void</span> QTreeWidget::<span class="name">setHeaderItem</span> ( <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i> )</h3>
<p>Sets the header <i>item</i> for the tree widget. The label for each column in the header is supplied by the corresponding label in the item.</p>
<p>The tree widget takes ownership of the item.</p>
<p><b>See also </b><a href="qtreewidget.html#headerItem">headerItem</a>() and <a href="qtreewidget.html#setHeaderLabels">setHeaderLabels</a>().</p>
<!-- @@@setHeaderItem -->
<!-- $$$setHeaderLabel[overload1]$$$setHeaderLabelconstQString& -->
<h3 class="fn"><a name="setHeaderLabel"></a><span class="type">void</span> QTreeWidget::<span class="name">setHeaderLabel</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label</i> )</h3>
<p>Same as setHeaderLabels(<a href="qstringlist.html">QStringList</a>(<i>label</i>)).</p>
<p>This function was introduced in Qt 4.2.</p>
<!-- @@@setHeaderLabel -->
<!-- $$$setHeaderLabels[overload1]$$$setHeaderLabelsconstQStringList& -->
<h3 class="fn"><a name="setHeaderLabels"></a><span class="type">void</span> QTreeWidget::<span class="name">setHeaderLabels</span> ( const <span class="type"><a href="qstringlist.html">QStringList</a></span> &amp; <i>labels</i> )</h3>
<p>Adds a column in the header for each item in the <i>labels</i> list, and sets the label for each column.</p>
<p>Note that setHeaderLabels() won't remove existing columns.</p>
<p><b>See also </b><a href="qtreewidget.html#setHeaderItem">setHeaderItem</a>() and <a href="qtreewidget.html#setHeaderLabel">setHeaderLabel</a>().</p>
<!-- @@@setHeaderLabels -->
<!-- $$$setItemWidget[overload1]$$$setItemWidgetQTreeWidgetItem*intQWidget* -->
<h3 class="fn"><a name="setItemWidget"></a><span class="type">void</span> QTreeWidget::<span class="name">setItemWidget</span> ( <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i>, <span class="type">int</span> <i>column</i>, <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>widget</i> )</h3>
<p>Sets the given <i>widget</i> to be displayed in the cell specified by the given <i>item</i> and <i>column</i>.</p>
<p>The given <i>widget</i>'s <a href="qwidget.html#autoFillBackground-prop">autoFillBackground</a> property must be set to true, otherwise the widget's background will be transparent, showing both the model data and the tree widget item.</p>
<p>This function should only be used to display static content in the place of a tree widget item. If you want to display custom dynamic content or implement a custom editor widget, use <a href="qtreeview.html">QTreeView</a> and subclass <a href="qitemdelegate.html">QItemDelegate</a> instead.</p>
<p>This function cannot be called before the item hierarchy has been set up, i.e&#x2e;, the <a href="qtreewidgetitem.html">QTreeWidgetItem</a> that will hold <i>widget</i> must have been added to the view before <i>widget</i> is set.</p>
<p><b>Note:</b> The tree takes ownership of the widget.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qtreewidget.html#itemWidget">itemWidget</a>() and <a href="model-view-programming.html#delegate-classes">Delegate Classes</a>.</p>
<!-- @@@setItemWidget -->
<!-- $$$setSelectionModel[overload1]$$$setSelectionModelQItemSelectionModel* -->
<h3 class="fn"><a name="setSelectionModel"></a><span class="type">void</span> QTreeWidget::<span class="name">setSelectionModel</span> ( <span class="type"><a href="qitemselectionmodel.html">QItemSelectionModel</a></span> * <i>selectionModel</i> )<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qabstractitemview.html#setSelectionModel">QAbstractItemView::setSelectionModel</a>().</p>
<!-- @@@setSelectionModel -->
<!-- $$$sortColumn[overload1]$$$sortColumn -->
<h3 class="fn"><a name="sortColumn"></a><span class="type">int</span> QTreeWidget::<span class="name">sortColumn</span> () const</h3>
<p>Returns the column used to sort the contents of the widget.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qtreewidget.html#sortItems">sortItems</a>().</p>
<!-- @@@sortColumn -->
<!-- $$$sortItems[overload1]$$$sortItemsintQt::SortOrder -->
<h3 class="fn"><a name="sortItems"></a><span class="type">void</span> QTreeWidget::<span class="name">sortItems</span> ( <span class="type">int</span> <i>column</i>, <span class="type"><a href="qt.html#SortOrder-enum">Qt::SortOrder</a></span> <i>order</i> )</h3>
<p>Sorts the items in the widget in the specified <i>order</i> by the values in the given <i>column</i>.</p>
<p><b>See also </b><a href="qtreewidget.html#sortColumn">sortColumn</a>().</p>
<!-- @@@sortItems -->
<!-- $$$supportedDropActions[overload1]$$$supportedDropActions -->
<h3 class="fn"><a name="supportedDropActions"></a><span class="type"><a href="qt.html#DropAction-enum">Qt::DropActions</a></span> QTreeWidget::<span class="name">supportedDropActions</span> () const<tt> [virtual protected]</tt></h3>
<p>Returns the drop actions supported by this view.</p>
<p><b>See also </b><a href="qt.html#DropAction-enum">Qt::DropActions</a>.</p>
<!-- @@@supportedDropActions -->
<!-- $$$takeTopLevelItem[overload1]$$$takeTopLevelItemint -->
<h3 class="fn"><a name="takeTopLevelItem"></a><span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * QTreeWidget::<span class="name">takeTopLevelItem</span> ( <span class="type">int</span> <i>index</i> )</h3>
<p>Removes the top-level item at the given <i>index</i> in the tree and returns it, otherwise returns 0;</p>
<p><b>See also </b><a href="qtreewidget.html#insertTopLevelItem">insertTopLevelItem</a>(), <a href="qtreewidget.html#topLevelItem">topLevelItem</a>(), and <a href="qtreewidget.html#topLevelItemCount-prop">topLevelItemCount</a>().</p>
<!-- @@@takeTopLevelItem -->
<!-- $$$topLevelItem[overload1]$$$topLevelItemint -->
<h3 class="fn"><a name="topLevelItem"></a><span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * QTreeWidget::<span class="name">topLevelItem</span> ( <span class="type">int</span> <i>index</i> ) const</h3>
<p>Returns the top level item at the given <i>index</i>, or 0 if the item does not exist.</p>
<p><b>See also </b><a href="qtreewidget.html#topLevelItemCount-prop">topLevelItemCount</a>() and <a href="qtreewidget.html#insertTopLevelItem">insertTopLevelItem</a>().</p>
<!-- @@@topLevelItem -->
<!-- $$$visualItemRect[overload1]$$$visualItemRectconstQTreeWidgetItem* -->
<h3 class="fn"><a name="visualItemRect"></a><span class="type"><a href="qrect.html">QRect</a></span> QTreeWidget::<span class="name">visualItemRect</span> ( const <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> * <i>item</i> ) const</h3>
<p>Returns the rectangle on the viewport occupied by the item at <i>item</i>.</p>
<p><b>See also </b><a href="qtreewidget.html#itemAt">itemAt</a>().</p>
<!-- @@@visualItemRect -->
</div>
  <div class="ft">
    <span></span>
  </div>
</div> 
<div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2012 Nokia Corporation and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Nokia, Qt and their respective logos are trademarks of Nokia Corporation 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
</div>
</body>
</html>