File: qabstractitemview.html

package info (click to toggle)
python-qt4 4.0.1-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 18,632 kB
  • ctags: 2,639
  • sloc: python: 29,409; sh: 5,646; cpp: 3,168; xml: 149; makefile: 109
file content (458 lines) | stat: -rw-r--r-- 74,140 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
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QAbstractItemView Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QAbstractItemView Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QAbstractItemView class provides the basic functionality for item view classes. <a href="#details">More...</a></p>
<p>Inherits <a href="qabstractscrollarea.html">QAbstractScrollArea</a>.</p><p>Inherited by <a href="qheaderview.html">QHeaderView</a>, <a href="qlistview.html">QListView</a>, <a href="qtableview.html">QTableView</a> and <a href="qtreeview.html">QTreeView</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qabstractitemview.html#CursorAction-enum">CursorAction</a></b> { MoveUp, MoveDown, MoveLeft, MoveRight, ..., MovePrevious }</li><li><div class="fn" />enum <b><a href="qabstractitemview.html#DropIndicatorPosition-enum">DropIndicatorPosition</a></b> { OnItem, AboveItem, BelowItem, OnViewport }</li><li><div class="fn" />enum <b><a href="qabstractitemview.html#EditTrigger-enum">EditTrigger</a></b> { NoEditTriggers, CurrentChanged, DoubleClicked, SelectedClicked, ..., AllEditTriggers }</li><li><div class="fn" />class <b><a href="qabstractitemview-edittriggers.html">EditTriggers</a></b></li><li><div class="fn" />enum <b><a href="qabstractitemview.html#ScrollHint-enum">ScrollHint</a></b> { EnsureVisible, PositionAtTop, PositionAtBottom }</li><li><div class="fn" />enum <b><a href="qabstractitemview.html#SelectionBehavior-enum">SelectionBehavior</a></b> { SelectItems, SelectRows, SelectColumns }</li><li><div class="fn" />enum <b><a href="qabstractitemview.html#SelectionMode-enum">SelectionMode</a></b> { NoSelection, SingleSelection, MultiSelection, ExtendedSelection, ContiguousSelection }</li><li><div class="fn" />enum <b><a href="qabstractitemview.html#State-enum">State</a></b> { NoState, DraggingState, DragSelectingState, EditingState, ExpandingState, CollapsingState }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qabstractitemview.html#QAbstractItemView">__init__</a></b> (<i>self</i>, QWidget&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" />bool <b><a href="qabstractitemview.html#alternatingRowColors">alternatingRowColors</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#clearSelection">clearSelection</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#closeEditor">closeEditor</a></b> (<i>self</i>, QWidget&#160;<i>editor</i>, QAbstractItemDelegate.EndEditHint&#160;<i>hint</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#closePersistentEditor">closePersistentEditor</a></b> (<i>self</i>, QModelIndex&#160;<i>index</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#commitData">commitData</a></b> (<i>self</i>, QWidget&#160;<i>editor</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#currentChanged">currentChanged</a></b> (<i>self</i>, QModelIndex&#160;<i>current</i>, QModelIndex&#160;<i>previous</i>)</li><li><div class="fn" />QModelIndex <b><a href="qabstractitemview.html#currentIndex">currentIndex</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#dataChanged">dataChanged</a></b> (<i>self</i>, QModelIndex&#160;<i>topLeft</i>, QModelIndex&#160;<i>bottomRight</i>)</li><li><div class="fn" />QPoint <b><a href="qabstractitemview.html#dirtyRegionOffset">dirtyRegionOffset</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#doItemsLayout">doItemsLayout</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qabstractitemview.html#dragEnabled">dragEnabled</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#dragEnterEvent">dragEnterEvent</a></b> (<i>self</i>, QDragEnterEvent&#160;<i>e</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#dragLeaveEvent">dragLeaveEvent</a></b> (<i>self</i>, QDragLeaveEvent&#160;<i>e</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#dragMoveEvent">dragMoveEvent</a></b> (<i>self</i>, QDragMoveEvent&#160;<i>e</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#dropEvent">dropEvent</a></b> (<i>self</i>, QDropEvent&#160;<i>e</i>)</li><li><div class="fn" />DropIndicatorPosition <b><a href="qabstractitemview.html#dropIndicatorPosition">dropIndicatorPosition</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#edit">edit</a></b> (<i>self</i>, QModelIndex&#160;<i>index</i>)</li><li><div class="fn" />bool <b><a href="qabstractitemview.html#edit-2">edit</a></b> (<i>self</i>, QModelIndex&#160;<i>index</i>, EditTrigger&#160;<i>trigger</i>, QEvent&#160;<i>event</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#editorDestroyed">editorDestroyed</a></b> (<i>self</i>, QObject&#160;<i>editor</i>)</li><li><div class="fn" />EditTriggers <b><a href="qabstractitemview.html#editTriggers">editTriggers</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qabstractitemview.html#event">event</a></b> (<i>self</i>, QEvent&#160;<i>event</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#executeDelayedItemsLayout">executeDelayedItemsLayout</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#focusInEvent">focusInEvent</a></b> (<i>self</i>, QFocusEvent&#160;<i>e</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#focusOutEvent">focusOutEvent</a></b> (<i>self</i>, QFocusEvent&#160;<i>e</i>)</li><li><div class="fn" />bool <b><a href="qabstractitemview.html#hasAutoScroll">hasAutoScroll</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qabstractitemview.html#horizontalOffset">horizontalOffset</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#horizontalScrollbarAction">horizontalScrollbarAction</a></b> (<i>self</i>, int&#160;<i>action</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#horizontalScrollbarValueChanged">horizontalScrollbarValueChanged</a></b> (<i>self</i>, int&#160;<i>value</i>)</li><li><div class="fn" />int <b><a href="qabstractitemview.html#horizontalStepsPerItem">horizontalStepsPerItem</a></b> (<i>self</i>)</li><li><div class="fn" />QSize <b><a href="qabstractitemview.html#iconSize">iconSize</a></b> (<i>self</i>)</li><li><div class="fn" />QModelIndex <b><a href="qabstractitemview.html#indexAt">indexAt</a></b> (<i>self</i>, QPoint&#160;<i>p</i>)</li><li><div class="fn" />QWidget <b><a href="qabstractitemview.html#indexWidget">indexWidget</a></b> (<i>self</i>, QModelIndex&#160;<i>index</i>)</li><li><div class="fn" />bool <b><a href="qabstractitemview.html#isIndexHidden">isIndexHidden</a></b> (<i>self</i>, QModelIndex&#160;<i>index</i>)</li><li><div class="fn" />QAbstractItemDelegate <b><a href="qabstractitemview.html#itemDelegate">itemDelegate</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#keyboardSearch">keyboardSearch</a></b> (<i>self</i>, QString&#160;<i>search</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#keyPressEvent">keyPressEvent</a></b> (<i>self</i>, QKeyEvent&#160;<i>e</i>)</li><li><div class="fn" />QAbstractItemModel <b><a href="qabstractitemview.html#model">model</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a></b> (<i>self</i>, QMouseEvent&#160;<i>e</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#mouseMoveEvent">mouseMoveEvent</a></b> (<i>self</i>, QMouseEvent&#160;<i>e</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#mousePressEvent">mousePressEvent</a></b> (<i>self</i>, QMouseEvent&#160;<i>e</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#mouseReleaseEvent">mouseReleaseEvent</a></b> (<i>self</i>, QMouseEvent&#160;<i>e</i>)</li><li><div class="fn" />QModelIndex <b><a href="qabstractitemview.html#moveCursor">moveCursor</a></b> (<i>self</i>, CursorAction&#160;<i>cursorAction</i>, Qt.KeyboardModifiers&#160;<i>modifiers</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#openPersistentEditor">openPersistentEditor</a></b> (<i>self</i>, QModelIndex&#160;<i>index</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#reset">reset</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#resizeEvent">resizeEvent</a></b> (<i>self</i>, QResizeEvent&#160;<i>e</i>)</li><li><div class="fn" />QModelIndex <b><a href="qabstractitemview.html#rootIndex">rootIndex</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#rowsAboutToBeRemoved">rowsAboutToBeRemoved</a></b> (<i>self</i>, QModelIndex&#160;<i>parent</i>, int&#160;<i>start</i>, int&#160;<i>end</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#rowsInserted">rowsInserted</a></b> (<i>self</i>, QModelIndex&#160;<i>parent</i>, int&#160;<i>start</i>, int&#160;<i>end</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#scheduleDelayedItemsLayout">scheduleDelayedItemsLayout</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#scrollDirtyRegion">scrollDirtyRegion</a></b> (<i>self</i>, int&#160;<i>dx</i>, int&#160;<i>dy</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#scrollTo">scrollTo</a></b> (<i>self</i>, QModelIndex&#160;<i>index</i>, ScrollHint&#160;<i>hint</i>&#160;=&#160;QAbstractItemView.EnsureVisible)</li><li><div class="fn" /><b><a href="qabstractitemview.html#scrollToBottom">scrollToBottom</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#scrollToTop">scrollToTop</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#selectAll">selectAll</a></b> (<i>self</i>)</li><li><div class="fn" />QModelIndex-list <b><a href="qabstractitemview.html#selectedIndexes">selectedIndexes</a></b> (<i>self</i>)</li><li><div class="fn" />SelectionBehavior <b><a href="qabstractitemview.html#selectionBehavior">selectionBehavior</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#selectionChanged">selectionChanged</a></b> (<i>self</i>, QItemSelection&#160;<i>selected</i>, QItemSelection&#160;<i>deselected</i>)</li><li><div class="fn" />QItemSelectionModel.SelectionFlags <b><a href="qabstractitemview.html#selectionCommand">selectionCommand</a></b> (<i>self</i>, QModelIndex&#160;<i>index</i>, QEvent&#160;<i>event</i>&#160;=&#160;None)</li><li><div class="fn" />SelectionMode <b><a href="qabstractitemview.html#selectionMode">selectionMode</a></b> (<i>self</i>)</li><li><div class="fn" />QItemSelectionModel <b><a href="qabstractitemview.html#selectionModel">selectionModel</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#setAlternatingRowColors">setAlternatingRowColors</a></b> (<i>self</i>, bool&#160;<i>enable</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#setAutoScroll">setAutoScroll</a></b> (<i>self</i>, bool&#160;<i>enable</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#setCurrentIndex">setCurrentIndex</a></b> (<i>self</i>, QModelIndex&#160;<i>index</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#setDirtyRegion">setDirtyRegion</a></b> (<i>self</i>, QRegion&#160;<i>region</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#setDragEnabled">setDragEnabled</a></b> (<i>self</i>, bool&#160;<i>enable</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#setDropIndicatorShown">setDropIndicatorShown</a></b> (<i>self</i>, bool&#160;<i>enable</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#setEditTriggers">setEditTriggers</a></b> (<i>self</i>, EditTriggers&#160;<i>triggers</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#setHorizontalStepsPerItem">setHorizontalStepsPerItem</a></b> (<i>self</i>, int&#160;<i>steps</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#setIconSize">setIconSize</a></b> (<i>self</i>, QSize&#160;<i>size</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#setIndexWidget">setIndexWidget</a></b> (<i>self</i>, QModelIndex&#160;<i>index</i>, QWidget&#160;<i>widget</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#setItemDelegate">setItemDelegate</a></b> (<i>self</i>, QAbstractItemDelegate&#160;<i>delegate</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#setModel">setModel</a></b> (<i>self</i>, QAbstractItemModel&#160;<i>model</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#setRootIndex">setRootIndex</a></b> (<i>self</i>, QModelIndex&#160;<i>index</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#setSelection">setSelection</a></b> (<i>self</i>, QRect&#160;<i>rect</i>, QItemSelectionModel.SelectionFlags&#160;<i>command</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#setSelectionBehavior">setSelectionBehavior</a></b> (<i>self</i>, SelectionBehavior&#160;<i>behavior</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#setSelectionMode">setSelectionMode</a></b> (<i>self</i>, SelectionMode&#160;<i>mode</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#setSelectionModel">setSelectionModel</a></b> (<i>self</i>, QItemSelectionModel&#160;<i>selectionModel</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#setState">setState</a></b> (<i>self</i>, State&#160;<i>state</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#setTabKeyNavigation">setTabKeyNavigation</a></b> (<i>self</i>, bool&#160;<i>enable</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#setTextElideMode">setTextElideMode</a></b> (<i>self</i>, Qt.TextElideMode&#160;<i>mode</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#setVerticalStepsPerItem">setVerticalStepsPerItem</a></b> (<i>self</i>, int&#160;<i>steps</i>)</li><li><div class="fn" />bool <b><a href="qabstractitemview.html#showDropIndicator">showDropIndicator</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qabstractitemview.html#sizeHintForColumn">sizeHintForColumn</a></b> (<i>self</i>, int&#160;<i>column</i>)</li><li><div class="fn" />QSize <b><a href="qabstractitemview.html#sizeHintForIndex">sizeHintForIndex</a></b> (<i>self</i>, QModelIndex&#160;<i>index</i>)</li><li><div class="fn" />int <b><a href="qabstractitemview.html#sizeHintForRow">sizeHintForRow</a></b> (<i>self</i>, int&#160;<i>row</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#startDrag">startDrag</a></b> (<i>self</i>, Qt.DropActions&#160;<i>supportedActions</i>)</li><li><div class="fn" />State <b><a href="qabstractitemview.html#state">state</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qabstractitemview.html#tabKeyNavigation">tabKeyNavigation</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.TextElideMode <b><a href="qabstractitemview.html#textElideMode">textElideMode</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#timerEvent">timerEvent</a></b> (<i>self</i>, QTimerEvent&#160;<i>e</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#updateEditorData">updateEditorData</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#updateEditorGeometries">updateEditorGeometries</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#updateGeometries">updateGeometries</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qabstractitemview.html#verticalOffset">verticalOffset</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#verticalScrollbarAction">verticalScrollbarAction</a></b> (<i>self</i>, int&#160;<i>action</i>)</li><li><div class="fn" /><b><a href="qabstractitemview.html#verticalScrollbarValueChanged">verticalScrollbarValueChanged</a></b> (<i>self</i>, int&#160;<i>value</i>)</li><li><div class="fn" />int <b><a href="qabstractitemview.html#verticalStepsPerItem">verticalStepsPerItem</a></b> (<i>self</i>)</li><li><div class="fn" />QStyleOptionViewItem <b><a href="qabstractitemview.html#viewOptions">viewOptions</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qabstractitemview.html#viewportEvent">viewportEvent</a></b> (<i>self</i>, QEvent&#160;<i>e</i>)</li><li><div class="fn" />QRect <b><a href="qabstractitemview.html#visualRect">visualRect</a></b> (<i>self</i>, QModelIndex&#160;<i>index</i>)</li><li><div class="fn" />QRegion <b><a href="qabstractitemview.html#visualRegionForSelection">visualRegionForSelection</a></b> (<i>self</i>, QItemSelection&#160;<i>selection</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qabstractitemview.html#activated">activated</a></b> (const QModelIndex&amp;)</li><li><div class="fn" />void <b><a href="qabstractitemview.html#clicked">clicked</a></b> (const QModelIndex&amp;)</li><li><div class="fn" />void <b><a href="qabstractitemview.html#doubleClicked">doubleClicked</a></b> (const QModelIndex&amp;)</li><li><div class="fn" />void <b><a href="qabstractitemview.html#entered">entered</a></b> (const QModelIndex&amp;)</li><li><div class="fn" />void <b><a href="qabstractitemview.html#pressed">pressed</a></b> (const QModelIndex&amp;)</li><li><div class="fn" />void <b><a href="qabstractitemview.html#viewportEntered">viewportEntered</a></b> ()</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QAbstractItemView class provides the basic functionality for item view classes.</p>
<p>QAbstractItemView class is the base class for every standard view that uses a <a href="qabstractitemmodel.html">QAbstractItemModel</a>. QAbstractItemView is an abstract class and cannot itself be instantiated. It provides a standard interface for interoperating with models through the signals and slots mechanism, enabling subclasses to be kept up-to-date with changes to their models. This class provides standard support for keyboard and mouse navigation, viewport scrolling, item editing, and selections.</p>
<p>The QAbstractItemView class is one of the <a href="model-view.html">Model/View Classes</a> and is part of Qt's <a href="model-view-programming.html">model/view framework</a>.</p>
<p>The view classes that inherit QAbstractItemView only need to implement their own view-specific functionality, such as drawing items, returning the geometry of items, finding items, etc.</p>
<p>QAbstractItemView provides common slots such as <a href="qabstractitemview.html#edit">edit</a>() and <a href="qabstractitemview.html#setCurrentIndex">setCurrentIndex</a>(). Many protected slots are also provided, including <a href="qabstractitemview.html#dataChanged">dataChanged</a>(), <a href="qabstractitemview.html#rowsInserted">rowsInserted</a>(), <a href="qabstractitemview.html#rowsAboutToBeRemoved">rowsAboutToBeRemoved</a>(), columnsInserted(), _q_columnsRemoved(), <a href="qabstractitemview.html#selectionChanged">selectionChanged</a>(), and <a href="qabstractitemview.html#currentChanged">currentChanged</a>().</p>
<p>The root item is returned by <a href="qabstractitemview.html#rootIndex">rootIndex</a>(), and the current item by <a href="qabstractitemview.html#currentIndex">currentIndex</a>(). To make sure that an item is visible use <a href="qabstractitemview.html#scrollTo">scrollTo</a>().</p>
<p>Some of QAbstractItemView's functions are concerned with scrolling, for example setHorizontalFactor() and setVerticalFactor(). Several other functions are concerned with selection control; for example <a href="qabstractitemview.html#selectionMode-prop">setSelectionMode</a>(), and <a href="qabstractitemview.html#selectionBehavior-prop">setSelectionBehavior</a>(). This class provides a default selection model to work with (<a href="qabstractitemview.html#selectionModel">selectionModel</a>()), but this can be replaced by using <a href="qabstractitemview.html#setSelectionModel">setSelectionModel</a>() with an instance of <a href="qitemselectionmodel.html">QItemSelectionModel</a>.</p>
<p>When implimenting a view that will have scrollbars you want to overload resizeEvent to set the scrollbars range so they will turn on and off, for example:</p>
<pre>
    horizontalScrollBar()-&gt;setRange(0, realWidth - width());
</pre>
<p>Note that QAbstractScrollView wont turn on/off the scroolbars based upon the ranges until the widget is shown. They should be manually turned on and off in if other functions require that information.</p>
<p>For complete control over the display and editing of items you can specify a delegate with <a href="qabstractitemview.html#setItemDelegate">setItemDelegate</a>().</p>
<p>QAbstractItemView provides a lot of protected functions. Some are concerned with editing, for example, <a href="qabstractitemview.html#edit">edit</a>(), and <a href="qabstractitemview.html#commitData">commitData</a>(), whilst others are keyboard and mouse event handlers.</p>
<p>See also <a href="model-view-programming.html">Model/View Programming</a> and <a href="qabstractitemmodel.html">QAbstractItemModel</a>.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="CursorAction-enum" />QAbstractItemView.CursorAction</h3><p>This enum describes the different ways to navigate between items,</p>
<table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr>
<th width="25%">Constant</th>
<th width="15%">Value</th>
<th width="60%">Description</th>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.MoveUp</tt></td>
<td align="center" valign="top"><tt>0</tt></td>
<td valign="top">Move to the item above the current item.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.MoveDown</tt></td>
<td align="center" valign="top"><tt>1</tt></td>
<td valign="top">Move to the item below the current item.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.MoveLeft</tt></td>
<td align="center" valign="top"><tt>2</tt></td>
<td valign="top">Move to the item left of the current item.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.MoveRight</tt></td>
<td align="center" valign="top"><tt>3</tt></td>
<td valign="top">Move to the item right of the current item.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.MoveHome</tt></td>
<td align="center" valign="top"><tt>4</tt></td>
<td valign="top">Move to the top-left corner item.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.MoveEnd</tt></td>
<td align="center" valign="top"><tt>5</tt></td>
<td valign="top">Move to the bottom-right corner item.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.MovePageUp</tt></td>
<td align="center" valign="top"><tt>6</tt></td>
<td valign="top">Move one page up above the current item.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.MovePageDown</tt></td>
<td align="center" valign="top"><tt>7</tt></td>
<td valign="top">Move one page down below the current item.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.MoveNext</tt></td>
<td align="center" valign="top"><tt>8</tt></td>
<td valign="top">Move to the item after the current item.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.MovePrevious</tt></td>
<td align="center" valign="top"><tt>9</tt></td>
<td valign="top">Move to the item before the current item.</td>
</tr>
</table>
<br />
<br />
<p>See also <a href="qabstractitemview.html#moveCursor">moveCursor</a>().</p>
<h3 class="fn"><a name="DropIndicatorPosition-enum" />QAbstractItemView.DropIndicatorPosition</h3><p>This enum indicates the position of the drop indicator in relation to the index at the current mouse position:</p>
<table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr>
<th width="25%">Constant</th>
<th width="15%">Value</th>
<th width="60%">Description</th>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.OnItem</tt></td>
<td align="center" valign="top"><tt>0</tt></td>
<td valign="top">The item will be dropped on the index.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.AboveItem</tt></td>
<td align="center" valign="top"><tt>1</tt></td>
<td valign="top">The item will be dropped above the index.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.BelowItem</tt></td>
<td align="center" valign="top"><tt>2</tt></td>
<td valign="top">The item will be dropped below the index.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.OnViewport</tt></td>
<td align="center" valign="top"><tt>3</tt></td>
<td valign="top">The item will be dropped onto a region of the viewport with no items. The way each view handles items dropped onto the viewport depends on the behavior of the underlying model in use.</td>
</tr>
</table>
<br />
<br />
<h3 class="fn"><a name="EditTrigger-enum" />QAbstractItemView.EditTrigger</h3><p>This enum describes actions which will initiate item editing.</p>
<table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr>
<th width="25%">Constant</th>
<th width="15%">Value</th>
<th width="60%">Description</th>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.NoEditTriggers</tt></td>
<td align="center" valign="top"><tt>0</tt></td>
<td valign="top">No editing possible.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.CurrentChanged</tt></td>
<td align="center" valign="top"><tt>1</tt></td>
<td valign="top">Editing start whenever current item changes.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.DoubleClicked</tt></td>
<td align="center" valign="top"><tt>2</tt></td>
<td valign="top">Editing starts when an item is double clicked.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.SelectedClicked</tt></td>
<td align="center" valign="top"><tt>4</tt></td>
<td valign="top">Editing starts when clicking on an already selected item.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.EditKeyPressed</tt></td>
<td align="center" valign="top"><tt>8</tt></td>
<td valign="top">Editing starts when an edit key has been pressed over an item.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.AnyKeyPressed</tt></td>
<td align="center" valign="top"><tt>16</tt></td>
<td valign="top">Editing starts when any key is pressed over an item.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.AllEditTriggers</tt></td>
<td align="center" valign="top"><tt>31</tt></td>
<td valign="top">Editing starts for all above actions.</td>
</tr>
</table>
<br />
<br />
<p>The EditTriggers type is a typedef for <a href="qflags.html">QFlags</a>&lt;EditTrigger&gt;. It stores an OR combination of EditTrigger values.</p>
<h3 class="fn"><a name="ScrollHint-enum" />QAbstractItemView.ScrollHint</h3><table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr>
<th width="25%">Constant</th>
<th width="15%">Value</th>
<th width="60%">Description</th>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.EnsureVisible</tt></td>
<td align="center" valign="top"><tt>0</tt></td>
<td valign="top">Scroll to ensure that the item is visible.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.PositionAtTop</tt></td>
<td align="center" valign="top"><tt>1</tt></td>
<td valign="top">Scroll to position the item at the top of the viewport.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.PositionAtBottom</tt></td>
<td align="center" valign="top"><tt>2</tt></td>
<td valign="top">Scroll to position the item at the bottom of the viewport.</td>
</tr>
</table>
<br />
<br />
<h3 class="fn"><a name="SelectionBehavior-enum" />QAbstractItemView.SelectionBehavior</h3><table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr>
<th width="25%">Constant</th>
<th width="15%">Value</th>
<th width="60%">Description</th>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.SelectItems</tt></td>
<td align="center" valign="top"><tt>0</tt></td>
<td valign="top">Selecting single items.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.SelectRows</tt></td>
<td align="center" valign="top"><tt>1</tt></td>
<td valign="top">Selecting only rows.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.SelectColumns</tt></td>
<td align="center" valign="top"><tt>2</tt></td>
<td valign="top">Selecting only columns.</td>
</tr>
</table>
<br />
<br />
<h3 class="fn"><a name="SelectionMode-enum" />QAbstractItemView.SelectionMode</h3><p>This enum indicates how the view responds to user selections:</p>
<table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr>
<th width="25%">Constant</th>
<th width="15%">Value</th>
<th width="60%">Description</th>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.SingleSelection</tt></td>
<td align="center" valign="top"><tt>1</tt></td>
<td valign="top">When the user selects an item, any already-selected item becomes unselected, and the user cannot unselect the selected item.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.ContiguousSelection</tt></td>
<td align="center" valign="top"><tt>4</tt></td>
<td valign="top">When the user selects an item in the usual way, the selection is cleared and the new item selected. However, if the user presses the Shift key while clicking on an item, all items between the current item and the clicked item are selected or unselected, depending on the state of the clicked item.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.ExtendedSelection</tt></td>
<td align="center" valign="top"><tt>3</tt></td>
<td valign="top">When the user selects an item in the usual way, the selection is cleared and the new item selected. However, if the user presses the Ctrl key when clicking on an item, the clicked item gets toggled and all other items are left untouched. If the user presses the Shift key while clicking on an item, all items between the current item and the clicked item are selected or unselected, depending on the state of the clicked item. Multiple items can be selected by dragging the mouse over them.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.MultiSelection</tt></td>
<td align="center" valign="top"><tt>2</tt></td>
<td valign="top">When the user selects an item in the usual way, the selection status of that item is toggled and the other items are left alone.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.NoSelection</tt></td>
<td align="center" valign="top"><tt>0</tt></td>
<td valign="top">Items cannot be selected.</td>
</tr>
</table>
<br />
<br />
<p>The most commonly used modes are SingleSelection and ExtendedSelection.</p>
<h3 class="fn"><a name="State-enum" />QAbstractItemView.State</h3><p>Describes the different states the view can be in. This is usually only interesting when reimplementing your own view.</p>
<table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr>
<th width="25%">Constant</th>
<th width="15%">Value</th>
<th width="60%">Description</th>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.NoState</tt></td>
<td align="center" valign="top"><tt>0</tt></td>
<td valign="top">The is the default state.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.DraggingState</tt></td>
<td align="center" valign="top"><tt>1</tt></td>
<td valign="top">The user is dragging items.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.DragSelectingState</tt></td>
<td align="center" valign="top"><tt>2</tt></td>
<td valign="top">The user is selecting items.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.EditingState</tt></td>
<td align="center" valign="top"><tt>3</tt></td>
<td valign="top">The user is editing an item in a widget editor.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.ExpandingState</tt></td>
<td align="center" valign="top"><tt>4</tt></td>
<td valign="top">The user is opening a branch of items.</td>
</tr>
<tr>
<td valign="top"><tt>QAbstractItemView.CollapsingState</tt></td>
<td align="center" valign="top"><tt>5</tt></td>
<td valign="top">The user is closing a branch of items.</td>
</tr>
</table>
<br />
<br />
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QAbstractItemView" />QAbstractItemView.__init__ (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs an abstract item view with the given <i>parent</i>.</p>
<h3 class="fn"><a name="alternatingRowColors" />bool QAbstractItemView.alternatingRowColors (<i>self</i>)</h3><h3 class="fn"><a name="clearSelection" />QAbstractItemView.clearSelection (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void clearSelection()</tt>.</p><p>Clears all selected items and the current index.</p>
<h3 class="fn"><a name="closeEditor" />QAbstractItemView.closeEditor (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>editor</i>, <a href="qabstractitemdelegate.html#EndEditHint-enum">QAbstractItemDelegate.EndEditHint</a>&#160;<i>hint</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void closeEditor(QWidget *,QAbstractItemDelegate::EndEditHint)</tt>.</p><p>Closes the given <i>editor</i>, and releases it. The <i>hint</i> is used to specify how the view should respond to the end of the editing operation. For example, the hint may indicate that the next item in the view should be opened for editing.</p>
<p>See also <a href="qabstractitemview.html#edit">edit</a>().</p>
<h3 class="fn"><a name="closePersistentEditor" />QAbstractItemView.closePersistentEditor (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>index</i>)</h3><p>Closes the persistent editor for the item at the given <i>index</i>.</p>
<h3 class="fn"><a name="commitData" />QAbstractItemView.commitData (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>editor</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void commitData(QWidget *)</tt>.</p><p>Commit the data in the <i>editor</i> to the model.</p>
<p>See also <a href="qabstractitemview.html#closeEditor">closeEditor</a>().</p>
<h3 class="fn"><a name="currentChanged" />QAbstractItemView.currentChanged (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>current</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>previous</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void currentChanged(const QModelIndex&amp;,const QModelIndex&amp;)</tt>.</p><p>This slot is called when a new item becomes the current item. The previous current item is specified by the <i>previous</i> index, and the new item by the <i>current</i> index.</p>
<p>If you want to know about changes to items see the <a href="qabstractitemview.html#dataChanged">dataChanged</a>() signal.</p>
<h3 class="fn"><a name="currentIndex" /><a href="qmodelindex.html">QModelIndex</a> QAbstractItemView.currentIndex (<i>self</i>)</h3><p>Returns the model index of the current item.</p>
<p>See also <a href="qabstractitemview.html#setCurrentIndex">setCurrentIndex</a>().</p>
<h3 class="fn"><a name="dataChanged" />QAbstractItemView.dataChanged (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>topLeft</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>bottomRight</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void dataChanged(const QModelIndex&amp;,const QModelIndex&amp;)</tt>.</p><p>This slot is called when items are changed in the model. The changed items are those from <i>topLeft</i> to <i>bottomRight</i> inclusive. If just one item is changed <i>topLeft</i> == <i>bottomRight</i>.</p>
<h3 class="fn"><a name="dirtyRegionOffset" /><a href="qpoint.html">QPoint</a> QAbstractItemView.dirtyRegionOffset (<i>self</i>)</h3><p>Returns the offset of the dirty regions in the view.</p>
<p>If you use <a href="qabstractitemview.html#scrollDirtyRegion">scrollDirtyRegion</a>() and implementa <a href="qabstractscrollarea.html#paintEvent">paintEvent</a>() in a subclass of <a href="qabstractitemview.html">QAbstractItemView</a>, you should translate the area given by the paint event with the offset returned from this function.</p>
<p>See also <a href="qabstractitemview.html#scrollDirtyRegion">scrollDirtyRegion</a>() and <a href="qabstractitemview.html#setDirtyRegion">setDirtyRegion</a>().</p>
<h3 class="fn"><a name="doItemsLayout" />QAbstractItemView.doItemsLayout (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void doItemsLayout()</tt>.</p><h3 class="fn"><a name="dragEnabled" />bool QAbstractItemView.dragEnabled (<i>self</i>)</h3><h3 class="fn"><a name="dragEnterEvent" />QAbstractItemView.dragEnterEvent (<i>self</i>, <a href="qdragenterevent.html">QDragEnterEvent</a>&#160;<i>e</i>)</h3><p>This function is called with the given <i>event</i> when a drag and drop operation enters the widget. If the drag is over a valid dropping place (e.g. over an item that accepts drops), the event is accepted; otherwise it is ignored.</p>
<p>Reimplemented from <a href="qwidget.html#dragEnterEvent">QWidget</a>.</p>
<p>See also <a href="qabstractitemview.html#dropEvent">dropEvent</a>() and <a href="qabstractitemview.html#startDrag">startDrag</a>().</p>
<h3 class="fn"><a name="dragLeaveEvent" />QAbstractItemView.dragLeaveEvent (<i>self</i>, <a href="qdragleaveevent.html">QDragLeaveEvent</a>&#160;<i>e</i>)</h3><p>This function is called when the item being dragged leaves the view. The <i>event</i> describes the state of the drag and drop operation.</p>
<p>Reimplemented from <a href="qwidget.html#dragLeaveEvent">QWidget</a>.</p>
<h3 class="fn"><a name="dragMoveEvent" />QAbstractItemView.dragMoveEvent (<i>self</i>, <a href="qdragmoveevent.html">QDragMoveEvent</a>&#160;<i>e</i>)</h3><p>This function is called continuously with the given <i>event</i> during a drag and drop operation over the widget. It can cause the view to scroll if, for example, the user drags a selection to view's right or bottom edge. In this case, the event will be accepted; otherwise it will be ignored.</p>
<p>Reimplemented from <a href="qwidget.html#dragMoveEvent">QWidget</a>.</p>
<p>See also <a href="qabstractitemview.html#dropEvent">dropEvent</a>() and <a href="qabstractitemview.html#startDrag">startDrag</a>().</p>
<h3 class="fn"><a name="dropEvent" />QAbstractItemView.dropEvent (<i>self</i>, <a href="qdropevent.html">QDropEvent</a>&#160;<i>e</i>)</h3><p>This function is called with the given <i>event</i> when a drop event occurs over the widget. If there's a valid item under the mouse pointer when the drop occurs, the drop event is accepted; otherwise it is ignored.</p>
<p>Reimplemented from <a href="qwidget.html#dropEvent">QWidget</a>.</p>
<p>See also <a href="qabstractitemview.html#startDrag">startDrag</a>().</p>
<h3 class="fn"><a name="dropIndicatorPosition" /><a href="qabstractitemview.html#DropIndicatorPosition-enum">DropIndicatorPosition</a> QAbstractItemView.dropIndicatorPosition (<i>self</i>)</h3><p>Returns the position of the drop indicator in relation to the closest item.</p>
<p>This function was introduced in Qt 4.1.</p>
<h3 class="fn"><a name="edit" />QAbstractItemView.edit (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>index</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void edit(const QModelIndex&amp;)</tt>.</p><p>Starts editing the item item at <i>index</i> if it is editable.</p>
<h3 class="fn"><a name="edit-2" />bool QAbstractItemView.edit (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>index</i>, <a href="qabstractitemview.html#EditTrigger-enum">EditTrigger</a>&#160;<i>trigger</i>, <a href="qevent.html">QEvent</a>&#160;<i>event</i>)</h3><p>This is an overloaded member function, provided for convenience.</p>
<p>Starts editing the item at <i>index</i>, creating an editor if necessary, and returns true if the view's <a href="qabstractitemview.html#State-enum">State</a> is now <a href="qabstractitemview.html#State-enum">EditingState</a>; otherwise returns false.</p>
<p>The action that caused the editing process is described by <i>trigger</i>, and the associated event is specified by <i>event</i>.</p>
<p>See also <a href="qabstractitemview.html#closeEditor">closeEditor</a>().</p>
<h3 class="fn"><a name="editorDestroyed" />QAbstractItemView.editorDestroyed (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>editor</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void editorDestroyed(QObject *)</tt>.</p><p>Remove the editor <i>editor</i> from the map.</p>
<h3 class="fn"><a name="editTriggers" /><a href="qabstractitemview-edittriggers.html">EditTriggers</a> QAbstractItemView.editTriggers (<i>self</i>)</h3><h3 class="fn"><a name="event" />bool QAbstractItemView.event (<i>self</i>, <a href="qevent.html">QEvent</a>&#160;<i>event</i>)</h3><h3 class="fn"><a name="executeDelayedItemsLayout" />QAbstractItemView.executeDelayedItemsLayout (<i>self</i>)</h3><p>Executes the scheduled layouts without waiting for the event processing to begin.</p>
<p>See also <a href="qabstractitemview.html#scheduleDelayedItemsLayout">scheduleDelayedItemsLayout</a>().</p>
<h3 class="fn"><a name="focusInEvent" />QAbstractItemView.focusInEvent (<i>self</i>, <a href="qfocusevent.html">QFocusEvent</a>&#160;<i>e</i>)</h3><p>This function is called with the given <i>event</i> when the widget obtains the focus. By default, the event is ignored.</p>
<p>Reimplemented from <a href="qwidget.html#focusInEvent">QWidget</a>.</p>
<p>See also <a href="qwidget.html#setFocus">setFocus</a>() and <a href="qabstractitemview.html#focusOutEvent">focusOutEvent</a>().</p>
<h3 class="fn"><a name="focusOutEvent" />QAbstractItemView.focusOutEvent (<i>self</i>, <a href="qfocusevent.html">QFocusEvent</a>&#160;<i>e</i>)</h3><p>This function is called with the given <i>event</i> when the widget obtains the focus. By default, the event is ignored.</p>
<p>Reimplemented from <a href="qwidget.html#focusOutEvent">QWidget</a>.</p>
<p>See also <a href="qwidget.html#clearFocus">clearFocus</a>() and <a href="qabstractitemview.html#focusInEvent">focusInEvent</a>().</p>
<h3 class="fn"><a name="hasAutoScroll" />bool QAbstractItemView.hasAutoScroll (<i>self</i>)</h3><h3 class="fn"><a name="horizontalOffset" />int QAbstractItemView.horizontalOffset (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns the horizontal offset of the view.</p>
<p>In the base class this is a pure virtual function.</p>
<h3 class="fn"><a name="horizontalScrollbarAction" />QAbstractItemView.horizontalScrollbarAction (<i>self</i>, int&#160;<i>action</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void horizontalScrollbarAction(int)</tt>.</p><h3 class="fn"><a name="horizontalScrollbarValueChanged" />QAbstractItemView.horizontalScrollbarValueChanged (<i>self</i>, int&#160;<i>value</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void horizontalScrollbarValueChanged(int)</tt>.</p><h3 class="fn"><a name="horizontalStepsPerItem" />int QAbstractItemView.horizontalStepsPerItem (<i>self</i>)</h3><p>Returns the horizontal scrollbar's steps per item.</p>
<p>See also <a href="qabstractitemview.html#setHorizontalStepsPerItem">setHorizontalStepsPerItem</a>() and <a href="qabstractitemview.html#verticalStepsPerItem">verticalStepsPerItem</a>().</p>
<h3 class="fn"><a name="iconSize" /><a href="qsize.html">QSize</a> QAbstractItemView.iconSize (<i>self</i>)</h3><h3 class="fn"><a name="indexAt" /><a href="qmodelindex.html">QModelIndex</a> QAbstractItemView.indexAt (<i>self</i>, <a href="qpoint.html">QPoint</a>&#160;<i>p</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns the model index of the item at point <i>point</i>.</p>
<p>In the base class this is a pure virtual function.</p>
<h3 class="fn"><a name="indexWidget" /><a href="qwidget.html">QWidget</a> QAbstractItemView.indexWidget (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>index</i>)</h3><p>Returns the widget for the item at the given <i>index</i>.</p>
<p>This function was introduced in Qt 4.1.</p>
<p>See also <a href="qabstractitemview.html#setIndexWidget">setIndexWidget</a>().</p>
<h3 class="fn"><a name="isIndexHidden" />bool QAbstractItemView.isIndexHidden (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>index</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns true if the item refered to by the given <i>index</i> is hidden in the view, otherwise returns false.</p>
<p>Hiding is a view specific feature. For example in TableView a column can be marked as hidden or a row in the TreeView.</p>
<p>In the base class this is a pure virtual function.</p>
<h3 class="fn"><a name="itemDelegate" /><a href="qabstractitemdelegate.html">QAbstractItemDelegate</a> QAbstractItemView.itemDelegate (<i>self</i>)</h3><p>Returns the item delegate used by this view and model. This is either one set with <a href="qabstractitemview.html#setItemDelegate">setItemDelegate</a>(), or the default one.</p>
<p>See also <a href="qabstractitemview.html#setItemDelegate">setItemDelegate</a>().</p>
<h3 class="fn"><a name="keyboardSearch" />QAbstractItemView.keyboardSearch (<i>self</i>, <a href="qstring.html">QString</a>&#160;<i>search</i>)</h3><p>Moves to and selects the item best matching the string <i>search</i>. If no item is found nothing happens.</p>
<h3 class="fn"><a name="keyPressEvent" />QAbstractItemView.keyPressEvent (<i>self</i>, <a href="qkeyevent.html">QKeyEvent</a>&#160;<i>e</i>)</h3><p>This function is called with the given <i>event</i> when a key event is sent to the widget. The default implementation handles basic cursor movement, e.g. Up, Down, Left, Right, Home, PageUp, and PageDown, and emits the returnPressed(), spacePressed(), and deletePressed() signals if the associated key is pressed. This function is where editing is initiated by key press, e.g. if F2 is pressed.</p>
<p>Reimplemented from <a href="qwidget.html#keyPressEvent">QWidget</a>.</p>
<p>See also <a href="qabstractitemview.html#edit">edit</a>().</p>
<h3 class="fn"><a name="model" /><a href="qabstractitemmodel.html">QAbstractItemModel</a> QAbstractItemView.model (<i>self</i>)</h3><p>Returns the model that this view is presenting.</p>
<p>See also <a href="qabstractitemview.html#setModel">setModel</a>().</p>
<h3 class="fn"><a name="mouseDoubleClickEvent" />QAbstractItemView.mouseDoubleClickEvent (<i>self</i>, <a href="qmouseevent.html">QMouseEvent</a>&#160;<i>e</i>)</h3><p>This function is called with the given <i>event</i> when a mouse button is double clicked inside the widget. If the double-click is on a valid item it emits the <a href="qabstractitemview.html#doubleClicked">doubleClicked</a>() signal and calls <a href="qabstractitemview.html#edit">edit</a>() on the item.</p>
<p>Reimplemented from <a href="qwidget.html#mouseDoubleClickEvent">QWidget</a>.</p>
<h3 class="fn"><a name="mouseMoveEvent" />QAbstractItemView.mouseMoveEvent (<i>self</i>, <a href="qmouseevent.html">QMouseEvent</a>&#160;<i>e</i>)</h3><p>This function is called with the given <i>event</i> when a mouse move event is sent to the widget. If a selection is in progress and new items are moved over the selection is extended; if a drag is in progress it is continued.</p>
<p>Reimplemented from <a href="qwidget.html#mouseMoveEvent">QWidget</a>.</p>
<h3 class="fn"><a name="mousePressEvent" />QAbstractItemView.mousePressEvent (<i>self</i>, <a href="qmouseevent.html">QMouseEvent</a>&#160;<i>e</i>)</h3><p>This function is called with the given <i>event</i> when a mouse button is pressed while the cursor is inside the widget. If a valid item is pressed on it is made into the current item. This function emits the <a href="qabstractitemview.html#pressed">pressed</a>() signal.</p>
<p>Reimplemented from <a href="qwidget.html#mousePressEvent">QWidget</a>.</p>
<h3 class="fn"><a name="mouseReleaseEvent" />QAbstractItemView.mouseReleaseEvent (<i>self</i>, <a href="qmouseevent.html">QMouseEvent</a>&#160;<i>e</i>)</h3><p>This function is called with the given <i>event</i> when a mouse button is released while the cursor is inside the widget. It will emit the <a href="qabstractitemview.html#clicked">clicked</a>() signal if an item was being pressed.</p>
<p>Reimplemented from <a href="qwidget.html#mouseReleaseEvent">QWidget</a>.</p>
<h3 class="fn"><a name="moveCursor" /><a href="qmodelindex.html">QModelIndex</a> QAbstractItemView.moveCursor (<i>self</i>, <a href="qabstractitemview.html#CursorAction-enum">CursorAction</a>&#160;<i>cursorAction</i>, <a href="qt-keyboardmodifiers.html">Qt.KeyboardModifiers</a>&#160;<i>modifiers</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Moves the cursor in the view according to the given <i>cursorAction</i> and keyboard modifiers specified by <i>modifiers</i>.</p>
<h3 class="fn"><a name="openPersistentEditor" />QAbstractItemView.openPersistentEditor (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>index</i>)</h3><p>Opens a persistent editor on the item at the given <i>index</i>. If no editor exists, the delegate will create a new editor.</p>
<h3 class="fn"><a name="reset" />QAbstractItemView.reset (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void reset()</tt>.</p><p>Reset the internal state of the view.</p>
<h3 class="fn"><a name="resizeEvent" />QAbstractItemView.resizeEvent (<i>self</i>, <a href="qresizeevent.html">QResizeEvent</a>&#160;<i>e</i>)</h3><p>This function is called with the given <i>event</i> when a resize event is sent to the widget.</p>
<p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget</a>.</p>
<p>See also <a href="qwidget.html#resizeEvent">QWidget.resizeEvent</a>().</p>
<h3 class="fn"><a name="rootIndex" /><a href="qmodelindex.html">QModelIndex</a> QAbstractItemView.rootIndex (<i>self</i>)</h3><p>Returns the model index of the model's root item. The root item is the parent item to the views toplevel items. The root can be invalid.</p>
<p>See also <a href="qabstractitemview.html#setRootIndex">setRootIndex</a>().</p>
<h3 class="fn"><a name="rowsAboutToBeRemoved" />QAbstractItemView.rowsAboutToBeRemoved (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>parent</i>, int&#160;<i>start</i>, int&#160;<i>end</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void rowsAboutToBeRemoved(const QModelIndex&amp;,int,int)</tt>.</p><p>This slot is called when rows are about to be removed. The deleted rows are those under the given <i>parent</i> from <i>start</i> to <i>end</i> inclusive.</p>
<p>See also <a href="qabstractitemview.html#rowsInserted">rowsInserted</a>().</p>
<h3 class="fn"><a name="rowsInserted" />QAbstractItemView.rowsInserted (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>parent</i>, int&#160;<i>start</i>, int&#160;<i>end</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void rowsInserted(const QModelIndex&amp;,int,int)</tt>.</p><p>This slot is called when rows are inserted. The new rows are those under the given <i>parent</i> from <i>start</i> to <i>end</i> inclusive. The base class implementation calls fetchMore() on the model to check for more data.</p>
<p>See also <a href="qabstractitemview.html#rowsAboutToBeRemoved">rowsAboutToBeRemoved</a>().</p>
<h3 class="fn"><a name="scheduleDelayedItemsLayout" />QAbstractItemView.scheduleDelayedItemsLayout (<i>self</i>)</h3><p>Schedules a layout of the items in the view to be executed when the event processing starts.</p>
<p>Even if scheduleDelayedItemsLayout() is called multiple times before events are processed, the view will only do the layout once.</p>
<p>See also <a href="qabstractitemview.html#executeDelayedItemsLayout">executeDelayedItemsLayout</a>().</p>
<h3 class="fn"><a name="scrollDirtyRegion" />QAbstractItemView.scrollDirtyRegion (<i>self</i>, int&#160;<i>dx</i>, int&#160;<i>dy</i>)</h3><p>Prepares the view for scrolling by (<i>dx</i>,<i>dy</i>) pixels by moving the dirty regions in the opposite direction. You only need to call this function if you are implementing a scrolling viewport in your view subclass.</p>
<p>If you implement <a href="qabstractscrollarea.html#scrollContentsBy">scrollContentsBy</a>() in a subclass of <a href="qabstractitemview.html">QAbstractItemView</a>, call this function before you call <a href="qwidget.html#scroll">QWidget.scroll</a>() on the viewport. Alternatively, just call <a href="qwidget.html#update">update</a>().</p>
<p>See also <a href="qabstractscrollarea.html#scrollContentsBy">scrollContentsBy</a>(), <a href="qabstractitemview.html#dirtyRegionOffset">dirtyRegionOffset</a>(), and <a href="qabstractitemview.html#setDirtyRegion">setDirtyRegion</a>().</p>
<h3 class="fn"><a name="scrollTo" />QAbstractItemView.scrollTo (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>index</i>, <a href="qabstractitemview.html#ScrollHint-enum">ScrollHint</a>&#160;<i>hint</i>&#160;=&#160;QAbstractItemView.EnsureVisible)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Scrolls the view if necessary to ensure that the item at <i>index</i> is visible. The view will try to position the item according to the given <i>hint</i>.</p>
<p>In the base class this is a pure virtual function.</p>
<h3 class="fn"><a name="scrollToBottom" />QAbstractItemView.scrollToBottom (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void scrollToBottom()</tt>.</p><p>Scrolls the view to the bottom.</p>
<p>This function was introduced in Qt 4.1.</p>
<h3 class="fn"><a name="scrollToTop" />QAbstractItemView.scrollToTop (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void scrollToTop()</tt>.</p><p>Scrolls the view to the top.</p>
<p>This function was introduced in Qt 4.1.</p>
<h3 class="fn"><a name="selectAll" />QAbstractItemView.selectAll (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void selectAll()</tt>.</p><p>Selects all non-hidden items.</p>
<h3 class="fn"><a name="selectedIndexes" />QModelIndex-list QAbstractItemView.selectedIndexes (<i>self</i>)</h3><p>This convenience function returns a list of all selected and non-hidden item indexes in the view. The list contains no duplicates, and is not sorted.</p>
<p>The default implementation does nothing.</p>
<h3 class="fn"><a name="selectionBehavior" /><a href="qabstractitemview.html#SelectionBehavior-enum">SelectionBehavior</a> QAbstractItemView.selectionBehavior (<i>self</i>)</h3><h3 class="fn"><a name="selectionChanged" />QAbstractItemView.selectionChanged (<i>self</i>, <a href="qitemselection.html">QItemSelection</a>&#160;<i>selected</i>, <a href="qitemselection.html">QItemSelection</a>&#160;<i>deselected</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void selectionChanged(const QItemSelection&amp;,const QItemSelection&amp;)</tt>.</p><p>This slot is called when the selection is changed. The previous selection (which may be empty), is specified by <i>deselected</i>, and the new selection by <i>selected</i>.</p>
<h3 class="fn"><a name="selectionCommand" /><a href="qitemselectionmodel-selectionflags.html">QItemSelectionModel.SelectionFlags</a> QAbstractItemView.selectionCommand (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>index</i>, <a href="qevent.html">QEvent</a>&#160;<i>event</i>&#160;=&#160;None)</h3><p>Returns the SelectionFlags to be used when updating a selection with to include the <i>index</i> specified. The <i>event</i> is a user input event, such as a mouse or keyboard event.</p>
<p>Reimplement this function to define your own selection behavior.</p>
<h3 class="fn"><a name="selectionMode" /><a href="qabstractitemview.html#SelectionMode-enum">SelectionMode</a> QAbstractItemView.selectionMode (<i>self</i>)</h3><h3 class="fn"><a name="selectionModel" /><a href="qitemselectionmodel.html">QItemSelectionModel</a> QAbstractItemView.selectionModel (<i>self</i>)</h3><p>Returns the current selection.</p>
<p>See also <a href="qabstractitemview.html#setSelectionModel">setSelectionModel</a>() and <a href="qabstractitemview.html#clearSelection">clearSelection</a>().</p>
<h3 class="fn"><a name="setAlternatingRowColors" />QAbstractItemView.setAlternatingRowColors (<i>self</i>, bool&#160;<i>enable</i>)</h3><h3 class="fn"><a name="setAutoScroll" />QAbstractItemView.setAutoScroll (<i>self</i>, bool&#160;<i>enable</i>)</h3><h3 class="fn"><a name="setCurrentIndex" />QAbstractItemView.setCurrentIndex (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>index</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setCurrentIndex(const QModelIndex&amp;)</tt>.</p><p>Sets the current item to be the item at <i>index</i>. Depending on the current selection mode, the item may also be selected.</p>
<p>To set an item as the current item without selecting it, call</p>
<p><tt>selectionModel()-&gt;setCurrentIndex(index, QItemSelectionModel.NoUpdate);</tt></p>
<p>See also <a href="qabstractitemview.html#currentIndex">currentIndex</a>(), <a href="qabstractitemview.html#selectionMode-prop">setSelectionMode</a>(), and <a href="qabstractitemview.html#selectionMode-prop">selectionMode</a>().</p>
<h3 class="fn"><a name="setDirtyRegion" />QAbstractItemView.setDirtyRegion (<i>self</i>, <a href="qregion.html">QRegion</a>&#160;<i>region</i>)</h3><p>Marks the given <i>region</i> as dirty and schedules it to be updated. You only need to call this function if you are implementing your own view subclass.</p>
<p>This function was introduced in Qt 4.1.</p>
<p>See also <a href="qabstractitemview.html#scrollDirtyRegion">scrollDirtyRegion</a>() and <a href="qabstractitemview.html#dirtyRegionOffset">dirtyRegionOffset</a>().</p>
<h3 class="fn"><a name="setDragEnabled" />QAbstractItemView.setDragEnabled (<i>self</i>, bool&#160;<i>enable</i>)</h3><h3 class="fn"><a name="setDropIndicatorShown" />QAbstractItemView.setDropIndicatorShown (<i>self</i>, bool&#160;<i>enable</i>)</h3><h3 class="fn"><a name="setEditTriggers" />QAbstractItemView.setEditTriggers (<i>self</i>, <a href="qabstractitemview-edittriggers.html">EditTriggers</a>&#160;<i>triggers</i>)</h3><h3 class="fn"><a name="setHorizontalStepsPerItem" />QAbstractItemView.setHorizontalStepsPerItem (<i>self</i>, int&#160;<i>steps</i>)</h3><p>Sets the horizontal scrollbar's steps per item to <i>steps</i>.</p>
<p>This is the number of steps used by the horizontal scrollbar to represent the width of an item.</p>
<p>Note that if the view has a horizontal header, the item steps will be ignored and the header section size will be used instead.</p>
<p>See also <a href="qabstractitemview.html#horizontalStepsPerItem">horizontalStepsPerItem</a>() and <a href="qabstractitemview.html#setVerticalStepsPerItem">setVerticalStepsPerItem</a>().</p>
<h3 class="fn"><a name="setIconSize" />QAbstractItemView.setIconSize (<i>self</i>, <a href="qsize.html">QSize</a>&#160;<i>size</i>)</h3><h3 class="fn"><a name="setIndexWidget" />QAbstractItemView.setIndexWidget (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>index</i>, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>)</h3><p>Sets the given <i>widget</i> on the item at the given <i>index</i>.</p>
<p>This function should only be used to display static content within the visible area corresponding to an item of data. If you want to display custom dynamic content or implement a custom editor widget, subclass <a href="qitemdelegate.html">QItemDelegate</a> instead.</p>
<p>Note: the viewport takes ownership of the widget.</p>
<p>This function was introduced in Qt 4.1.</p>
<p>See also <a href="qabstractitemview.html#indexWidget">indexWidget</a>() and <a href="model-view-delegate.html">Delegate Classes</a>.</p>
<h3 class="fn"><a name="setItemDelegate" />QAbstractItemView.setItemDelegate (<i>self</i>, <a href="qabstractitemdelegate.html">QAbstractItemDelegate</a>&#160;<i>delegate</i>)</h3><p>Sets the item delegate for this view and its model to <i>delegate</i>. This is useful if you want complete control over the editing and display of items.</p>
<p>See also <a href="qabstractitemview.html#itemDelegate">itemDelegate</a>().</p>
<h3 class="fn"><a name="setModel" />QAbstractItemView.setModel (<i>self</i>, <a href="qabstractitemmodel.html">QAbstractItemModel</a>&#160;<i>model</i>)</h3><p>Sets the <i>model</i> for the view to present.</p>
<p><b>Note:</b> This function will also create and set a new selection model, replacing any previously set with <a href="qabstractitemview.html#setSelectionModel">setSelectionModel</a>().</p>
<p>See also <a href="qabstractitemview.html#model">model</a>(), <a href="qabstractitemview.html#selectionModel">selectionModel</a>(), and <a href="qabstractitemview.html#setSelectionModel">setSelectionModel</a>().</p>
<h3 class="fn"><a name="setRootIndex" />QAbstractItemView.setRootIndex (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>index</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setRootIndex(const QModelIndex&amp;)</tt>.</p><p>Sets the root item to the item at the given <i>index</i>.</p>
<p>See also <a href="qabstractitemview.html#rootIndex">rootIndex</a>().</p>
<h3 class="fn"><a name="setSelection" />QAbstractItemView.setSelection (<i>self</i>, <a href="qrect.html">QRect</a>&#160;<i>rect</i>, <a href="qitemselectionmodel-selectionflags.html">QItemSelectionModel.SelectionFlags</a>&#160;<i>command</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Applies the selection <i>flags</i> to the items in or touched by the rectangle, <i>rect</i>.</p>
<p>When implementing your own itemview setSelection should call <a href="qabstractitemview.html#selectionModel">selectionModel</a>()-&gt;select(selection, flags) where selection is either an empty <a href="qmodelindex.html">QModelIndex</a> or a <a href="qitemselection.html">QItemSelection</a> that contains all items that are contained in <i>rect</i>.</p>
<p>See also <a href="qabstractitemview.html#selectionCommand">selectionCommand</a>().</p>
<h3 class="fn"><a name="setSelectionBehavior" />QAbstractItemView.setSelectionBehavior (<i>self</i>, <a href="qabstractitemview.html#SelectionBehavior-enum">SelectionBehavior</a>&#160;<i>behavior</i>)</h3><h3 class="fn"><a name="setSelectionMode" />QAbstractItemView.setSelectionMode (<i>self</i>, <a href="qabstractitemview.html#SelectionMode-enum">SelectionMode</a>&#160;<i>mode</i>)</h3><h3 class="fn"><a name="setSelectionModel" />QAbstractItemView.setSelectionModel (<i>self</i>, <a href="qitemselectionmodel.html">QItemSelectionModel</a>&#160;<i>selectionModel</i>)</h3><p>Sets the current selection to the given <i>selectionModel</i>.</p>
<p>Note that, if you call <a href="qabstractitemview.html#setModel">setModel</a>() after this function, the given <i>selectionModel</i> will be replaced by a one created by the view.</p>
<p>See also <a href="qabstractitemview.html#selectionModel">selectionModel</a>(), <a href="qabstractitemview.html#setModel">setModel</a>(), and <a href="qabstractitemview.html#clearSelection">clearSelection</a>().</p>
<h3 class="fn"><a name="setState" />QAbstractItemView.setState (<i>self</i>, <a href="qabstractitemview.html#State-enum">State</a>&#160;<i>state</i>)</h3><p>Sets the item view's state to the given <i>state</i></p>
<p>See also <a href="qabstractitemview.html#state">state</a>().</p>
<h3 class="fn"><a name="setTabKeyNavigation" />QAbstractItemView.setTabKeyNavigation (<i>self</i>, bool&#160;<i>enable</i>)</h3><h3 class="fn"><a name="setTextElideMode" />QAbstractItemView.setTextElideMode (<i>self</i>, <a href="qt.html#TextElideMode-enum">Qt.TextElideMode</a>&#160;<i>mode</i>)</h3><h3 class="fn"><a name="setVerticalStepsPerItem" />QAbstractItemView.setVerticalStepsPerItem (<i>self</i>, int&#160;<i>steps</i>)</h3><p>Sets the vertical scrollbar's steps per item to <i>steps</i>.</p>
<p>This is the number of steps used by the vertical scrollbar to represent the height of an item.</p>
<p>Note that if the view has a vertical header, the item steps will be ignored and the header section size will be used instead.</p>
<p>See also <a href="qabstractitemview.html#verticalStepsPerItem">verticalStepsPerItem</a>() and <a href="qabstractitemview.html#setHorizontalStepsPerItem">setHorizontalStepsPerItem</a>().</p>
<h3 class="fn"><a name="showDropIndicator" />bool QAbstractItemView.showDropIndicator (<i>self</i>)</h3><h3 class="fn"><a name="sizeHintForColumn" />int QAbstractItemView.sizeHintForColumn (<i>self</i>, int&#160;<i>column</i>)</h3><p>Returns the width size hint for the specified <i>column</i> or -1 if there is no model.</p>
<p>This function is used in views with a horizontal header to find the size hint for a header section based on the contents of the given <i>column</i>.</p>
<p>See also <a href="qabstractitemview.html#sizeHintForRow">sizeHintForRow</a>().</p>
<h3 class="fn"><a name="sizeHintForIndex" /><a href="qsize.html">QSize</a> QAbstractItemView.sizeHintForIndex (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>index</i>)</h3><p>Returns the size hint for the item with the specified <i>index</i> or an invalid size for invalid indexes.</p>
<h3 class="fn"><a name="sizeHintForRow" />int QAbstractItemView.sizeHintForRow (<i>self</i>, int&#160;<i>row</i>)</h3><p>Returns the height size hint for the specified <i>row</i> or -1 if there is no model.</p>
<p>This function is used in views with a vertical header to find the size hint for a header section based on the contents of the given <i>row</i>.</p>
<p>See also <a href="qabstractitemview.html#sizeHintForColumn">sizeHintForColumn</a>().</p>
<h3 class="fn"><a name="startDrag" />QAbstractItemView.startDrag (<i>self</i>, <a href="qt-dropactions.html">Qt.DropActions</a>&#160;<i>supportedActions</i>)</h3><p>Starts a drag by calling drag-&gt;start() using the given <i>supportedActions</i>.</p>
<h3 class="fn"><a name="state" /><a href="qabstractitemview.html#State-enum">State</a> QAbstractItemView.state (<i>self</i>)</h3><p>Returns the item view's state.</p>
<p>See also <a href="qabstractitemview.html#setState">setState</a>().</p>
<h3 class="fn"><a name="tabKeyNavigation" />bool QAbstractItemView.tabKeyNavigation (<i>self</i>)</h3><h3 class="fn"><a name="textElideMode" /><a href="qt.html#TextElideMode-enum">Qt.TextElideMode</a> QAbstractItemView.textElideMode (<i>self</i>)</h3><h3 class="fn"><a name="timerEvent" />QAbstractItemView.timerEvent (<i>self</i>, <a href="qtimerevent.html">QTimerEvent</a>&#160;<i>e</i>)</h3><p>This function is called with the given <i>event</i> when a timer event is sent to the widget.</p>
<p>Reimplemented from <a href="qobject.html#timerEvent">QObject</a>.</p>
<p>See also <a href="qobject.html#timerEvent">QObject.timerEvent</a>().</p>
<h3 class="fn"><a name="updateEditorData" />QAbstractItemView.updateEditorData (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void updateEditorData()</tt>.</p><h3 class="fn"><a name="updateEditorGeometries" />QAbstractItemView.updateEditorGeometries (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void updateEditorGeometries()</tt>.</p><h3 class="fn"><a name="updateGeometries" />QAbstractItemView.updateGeometries (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void updateGeometries()</tt>.</p><h3 class="fn"><a name="verticalOffset" />int QAbstractItemView.verticalOffset (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns the vertical offset of the view.</p>
<p>In the base class this is a pure virtual function.</p>
<h3 class="fn"><a name="verticalScrollbarAction" />QAbstractItemView.verticalScrollbarAction (<i>self</i>, int&#160;<i>action</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void verticalScrollbarAction(int)</tt>.</p><h3 class="fn"><a name="verticalScrollbarValueChanged" />QAbstractItemView.verticalScrollbarValueChanged (<i>self</i>, int&#160;<i>value</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void verticalScrollbarValueChanged(int)</tt>.</p><h3 class="fn"><a name="verticalStepsPerItem" />int QAbstractItemView.verticalStepsPerItem (<i>self</i>)</h3><p>Returns the vertical scrollbar's steps per item.</p>
<p>See also <a href="qabstractitemview.html#setVerticalStepsPerItem">setVerticalStepsPerItem</a>() and <a href="qabstractitemview.html#horizontalStepsPerItem">horizontalStepsPerItem</a>().</p>
<h3 class="fn"><a name="viewOptions" /><a href="qstyleoptionviewitem.html">QStyleOptionViewItem</a> QAbstractItemView.viewOptions (<i>self</i>)</h3><p>Returns <a href="qstyleoptionviewitem.html">QStyleOptionViewItem</a> structure populated with the view's palette, font, state, alignments etc.</p>
<h3 class="fn"><a name="viewportEvent" />bool QAbstractItemView.viewportEvent (<i>self</i>, <a href="qevent.html">QEvent</a>&#160;<i>e</i>)</h3><p>This function is used to handle tool tips, and What's This? mode, if the given <i>event</i> is a <a href="qevent.html#Type-enum">QEvent.ToolTip</a>,or a <a href="qevent.html#Type-enum">QEvent.WhatsThis</a>. It passes all other events on to its base class viewportEvent() handler.</p>
<p>Reimplemented from <a href="qabstractscrollarea.html#viewportEvent">QAbstractScrollArea</a>.</p>
<h3 class="fn"><a name="visualRect" /><a href="qrect.html">QRect</a> QAbstractItemView.visualRect (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>index</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns the rectangle on the viewport occupied by the item at <i>index</i>.</p>
<p>If your item is displayed in several areas then visualRect should return the primary area that contains index and not the complete area that index might encompasses, touch or cause drawing.</p>
<p>In the base class this is a pure virtual function.</p>
<h3 class="fn"><a name="visualRegionForSelection" /><a href="qregion.html">QRegion</a> QAbstractItemView.visualRegionForSelection (<i>self</i>, <a href="qitemselection.html">QItemSelection</a>&#160;<i>selection</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns the region from the viewport of the items in the given <i>selection</i>.</p>
<hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="activated" />void activated (const QModelIndex&amp;)</h3><p>This signal is emitted when the item specified by <i>index</i> is activated by the user (e.g., by single- or double-clicking the item, depending on the platform).</p>
<p>See also <a href="qabstractitemview.html#clicked">clicked</a>(), <a href="qabstractitemview.html#doubleClicked">doubleClicked</a>(), <a href="qabstractitemview.html#entered">entered</a>(), and <a href="qabstractitemview.html#pressed">pressed</a>().</p>
<h3 class="fn"><a name="clicked" />void clicked (const QModelIndex&amp;)</h3><p>This signal is emitted when a mouse button is clicked. The item the mouse was clicked on is specified by <i>index</i>. The signal is only emitted when the index is valid.</p>
<p>See also <a href="qabstractitemview.html#activated">activated</a>(), <a href="qabstractitemview.html#doubleClicked">doubleClicked</a>(), <a href="qabstractitemview.html#entered">entered</a>(), and <a href="qabstractitemview.html#pressed">pressed</a>().</p>
<h3 class="fn"><a name="doubleClicked" />void doubleClicked (const QModelIndex&amp;)</h3><p>This signal is emitted when a mouse button is double-clicked. The item the mouse was double-clicked on is specified by <i>index</i>. The signal is only emitted when the index is valid.</p>
<h3 class="fn"><a name="entered" />void entered (const QModelIndex&amp;)</h3><p>This signal is emitted when the mouse cursor enters the item specified by <i>index</i>. Mouse tracking needs to be enabled for this feature to work.</p>
<p>See also <a href="qabstractitemview.html#viewportEntered">viewportEntered</a>(), <a href="qabstractitemview.html#activated">activated</a>(), <a href="qabstractitemview.html#clicked">clicked</a>(), <a href="qabstractitemview.html#doubleClicked">doubleClicked</a>(), and <a href="qabstractitemview.html#pressed">pressed</a>().</p>
<h3 class="fn"><a name="pressed" />void pressed (const QModelIndex&amp;)</h3><p>This signal is emitted when a mouse button is pressed. The item the mouse was pressed on is specified by <i>index</i>. The signal is only emitted when the index is valid.</p>
<p>See also <a href="qabstractitemview.html#activated">activated</a>(), <a href="qabstractitemview.html#clicked">clicked</a>(), <a href="qabstractitemview.html#doubleClicked">doubleClicked</a>(), and <a href="qabstractitemview.html#entered">entered</a>().</p>
<h3 class="fn"><a name="viewportEntered" />void viewportEntered ()</h3><p>This signal is emitted when the mouse cursor enters the viewport. Mouse tracking needs to be enabled for this feature to work.</p>
<p>See also <a href="qabstractitemview.html#entered">entered</a>().</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td width="25%">PyQt&#160;4.0.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.trolltech.com">Trolltech&#160;AS</a> 2006</td><td align="right" width="25%">Qt&#160;4.1.4</td></tr></table></div></address></body></html>