~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/qlistview.html

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1"?>
 
2
<!DOCTYPE html
 
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/gui/itemviews/qlistview.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: QListView Class Reference</title>
 
8
    <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
 
9
a:link { color: #004faf; text-decoration: none }
 
10
a:visited { color: #672967; text-decoration: none }
 
11
td.postheader { font-family: sans-serif }
 
12
tr.address { font-family: sans-serif }
 
13
body { background: #ffffff; color: black; }</style>
 
14
</head>
 
15
<body>
 
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 
17
<tr>
 
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
 
19
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="annotated.html"><font color="#004faf">Annotated</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
 
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">QListView Class Reference</h1>
 
21
<p>The QListView class provides a list or icon view onto a model. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;QListView&gt;</pre><p>Part of the <a href="qtgui.html">QtGui</a> module.</p>
 
23
<p>Inherits <a href="qabstractitemview.html">QAbstractItemView</a>.</p>
 
24
<p>Inherited by <a href="qlistwidget.html">QListWidget</a>.</p>
 
25
<ul>
 
26
<li><a href="qlistview-members.html">List of all members, including inherited members</a></li>
 
27
</ul>
 
28
<a name="public-types"></a>
 
29
<h3>Public Types</h3>
 
30
<ul>
 
31
<li><div class="fn"/>enum <b><a href="qlistview.html#Flow-enum">Flow</a></b> { LeftToRight, TopToBottom }</li>
 
32
<li><div class="fn"/>enum <b><a href="qlistview.html#LayoutMode-enum">LayoutMode</a></b> { SinglePass, Batched }</li>
 
33
<li><div class="fn"/>enum <b><a href="qlistview.html#Movement-enum">Movement</a></b> { Static, Free, Snap }</li>
 
34
<li><div class="fn"/>enum <b><a href="qlistview.html#ResizeMode-enum">ResizeMode</a></b> { Fixed, Adjust }</li>
 
35
<li><div class="fn"/>enum <b><a href="qlistview.html#ViewMode-enum">ViewMode</a></b> { ListMode, IconMode }</li>
 
36
</ul>
 
37
<a name="properties"></a>
 
38
<h3>Properties</h3>
 
39
<table width="100%" border="0" cellpadding="0" cellspacing="0">
 
40
<tr><td width="45%" valign="top"><ul>
 
41
<li><div class="fn"/><b><a href="qlistview.html#flow-prop">flow</a></b> : Flow</li>
 
42
<li><div class="fn"/><b><a href="qlistview.html#gridSize-prop">gridSize</a></b> : QSize</li>
 
43
<li><div class="fn"/><b><a href="qlistview.html#isWrapping-prop">isWrapping</a></b> : bool</li>
 
44
<li><div class="fn"/><b><a href="qlistview.html#layoutMode-prop">layoutMode</a></b> : LayoutMode</li>
 
45
<li><div class="fn"/><b><a href="qlistview.html#modelColumn-prop">modelColumn</a></b> : int</li>
 
46
</ul></td><td valign="top"><ul>
 
47
<li><div class="fn"/><b><a href="qlistview.html#movement-prop">movement</a></b> : Movement</li>
 
48
<li><div class="fn"/><b><a href="qlistview.html#resizeMode-prop">resizeMode</a></b> : ResizeMode</li>
 
49
<li><div class="fn"/><b><a href="qlistview.html#spacing-prop">spacing</a></b> : int</li>
 
50
<li><div class="fn"/><b><a href="qlistview.html#viewMode-prop">viewMode</a></b> : ViewMode</li>
 
51
</ul>
 
52
</td></tr>
 
53
</table>
 
54
<ul>
 
55
<li><div class="fn"/>10 properties inherited from <a href="qabstractitemview.html#properties">QAbstractItemView</a></li>
 
56
<li><div class="fn"/>2 properties inherited from <a href="qabstractscrollarea.html#properties">QAbstractScrollArea</a></li>
 
57
<li><div class="fn"/>6 properties inherited from <a href="qframe.html#properties">QFrame</a></li>
 
58
<li><div class="fn"/>52 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
 
59
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
 
60
</ul>
 
61
<a name="public-functions"></a>
 
62
<h3>Public Functions</h3>
 
63
<ul>
 
64
<li><div class="fn"/><b><a href="qlistview.html#QListView">QListView</a></b> ( QWidget * <i>parent</i> = 0 )</li>
 
65
<li><div class="fn"/><b><a href="qlistview.html#dtor.QListView">~QListView</a></b> ()</li>
 
66
<li><div class="fn"/>void <b><a href="qlistview.html#clearPropertyFlags">clearPropertyFlags</a></b> ()</li>
 
67
<li><div class="fn"/>Flow <b><a href="qlistview.html#flow-prop">flow</a></b> () const</li>
 
68
<li><div class="fn"/>QSize <b><a href="qlistview.html#gridSize-prop">gridSize</a></b> () const</li>
 
69
<li><div class="fn"/>bool <b><a href="qlistview.html#isRowHidden">isRowHidden</a></b> ( int <i>row</i> ) const</li>
 
70
<li><div class="fn"/>bool <b><a href="qlistview.html#isWrapping-prop">isWrapping</a></b> () const</li>
 
71
<li><div class="fn"/>LayoutMode <b><a href="qlistview.html#layoutMode-prop">layoutMode</a></b> () const</li>
 
72
<li><div class="fn"/>int <b><a href="qlistview.html#modelColumn-prop">modelColumn</a></b> () const</li>
 
73
<li><div class="fn"/>Movement <b><a href="qlistview.html#movement-prop">movement</a></b> () const</li>
 
74
<li><div class="fn"/>ResizeMode <b><a href="qlistview.html#resizeMode-prop">resizeMode</a></b> () const</li>
 
75
<li><div class="fn"/>void <b><a href="qlistview.html#flow-prop">setFlow</a></b> ( Flow <i>flow</i> )</li>
 
76
<li><div class="fn"/>void <b><a href="qlistview.html#gridSize-prop">setGridSize</a></b> ( const QSize &amp; <i>size</i> )</li>
 
77
<li><div class="fn"/>void <b><a href="qlistview.html#layoutMode-prop">setLayoutMode</a></b> ( LayoutMode <i>mode</i> )</li>
 
78
<li><div class="fn"/>void <b><a href="qlistview.html#modelColumn-prop">setModelColumn</a></b> ( int <i>column</i> )</li>
 
79
<li><div class="fn"/>void <b><a href="qlistview.html#movement-prop">setMovement</a></b> ( Movement <i>movement</i> )</li>
 
80
<li><div class="fn"/>void <b><a href="qlistview.html#resizeMode-prop">setResizeMode</a></b> ( ResizeMode <i>mode</i> )</li>
 
81
<li><div class="fn"/>void <b><a href="qlistview.html#setRowHidden">setRowHidden</a></b> ( int <i>row</i>, bool <i>hide</i> )</li>
 
82
<li><div class="fn"/>void <b><a href="qlistview.html#spacing-prop">setSpacing</a></b> ( int <i>space</i> )</li>
 
83
<li><div class="fn"/>void <b><a href="qlistview.html#viewMode-prop">setViewMode</a></b> ( ViewMode <i>mode</i> )</li>
 
84
<li><div class="fn"/>void <b><a href="qlistview.html#isWrapping-prop">setWrapping</a></b> ( bool <i>enable</i> )</li>
 
85
<li><div class="fn"/>int <b><a href="qlistview.html#spacing-prop">spacing</a></b> () const</li>
 
86
<li><div class="fn"/>ViewMode <b><a href="qlistview.html#viewMode-prop">viewMode</a></b> () const</li>
 
87
</ul>
 
88
<ul>
 
89
<li><div class="fn"/>37 public functions inherited from <a href="qabstractitemview.html#public-functions">QAbstractItemView</a></li>
 
90
<li><div class="fn"/>8 public functions inherited from <a href="qabstractscrollarea.html#public-functions">QAbstractScrollArea</a></li>
 
91
<li><div class="fn"/>13 public functions inherited from <a href="qframe.html#public-functions">QFrame</a></li>
 
92
<li><div class="fn"/>183 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
 
93
<li><div class="fn"/>28 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
 
94
<li><div class="fn"/>10 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
 
95
</ul>
 
96
<a name="protected-functions"></a>
 
97
<h3>Protected Functions</h3>
 
98
<ul>
 
99
<li><div class="fn"/>QRect <b><a href="qlistview.html#rectForIndex">rectForIndex</a></b> ( const QModelIndex &amp; <i>index</i> ) const</li>
 
100
</ul>
 
101
<ul>
 
102
<li><div class="fn"/>35 protected functions inherited from <a href="qabstractitemview.html#protected-functions">QAbstractItemView</a></li>
 
103
<li><div class="fn"/>17 protected functions inherited from <a href="qabstractscrollarea.html#protected-functions">QAbstractScrollArea</a></li>
 
104
<li><div class="fn"/>39 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
 
105
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
 
106
</ul>
 
107
<h3>Additional Inherited Members</h3>
 
108
<ul>
 
109
<li><div class="fn"/>6 public slots inherited from <a href="qabstractitemview.html#public-slots">QAbstractItemView</a></li>
 
110
<li><div class="fn"/>17 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
 
111
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
 
112
<li><div class="fn"/>6 signals inherited from <a href="qabstractitemview.html#signals">QAbstractItemView</a></li>
 
113
<li><div class="fn"/>1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
 
114
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
 
115
<li><div class="fn"/>2 static public members inherited from <a href="qframe.html#static-public-members">QFrame</a></li>
 
116
<li><div class="fn"/>4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
 
117
<li><div class="fn"/>4 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
 
118
<li><div class="fn"/>8 protected slots inherited from <a href="qabstractitemview.html#protected-slots">QAbstractItemView</a></li>
 
119
</ul>
 
120
<a name="details"></a>
 
121
<hr />
 
122
<h2>Detailed Description</h2>
 
123
<p>The QListView class provides a list or icon view onto a model.</p>
 
124
<p>A QListView presents items stored in a model, either as a simple non-hierarchical list, or as a collection of icons. This class is used to provide lists and icon views that were previously provided by the <tt>QListBox</tt> and <tt>QIconView</tt> classes, but using the more flexible approach provided by Qt's model/view architecture.</p>
 
125
<p>The QListView 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>
 
126
<p>This view does not display horizontal or vertical headers; to display a list of items with a horizontal header, use <a href="qtreeview.html">QTreeView</a> instead.</p>
 
127
<p>QListView implements the interfaces defined by the <a href="qabstractitemview.html">QAbstractItemView</a> class to allow it to display data provided by models derived from the <a href="qabstractitemmodel.html">QAbstractItemModel</a> class.</p>
 
128
<p>Items in a list view can be displayed using one of two view modes: In <tt>ListMode</tt>, the items are displayed in the form of a simple list; in <tt>IconMode</tt>, the list view takes the form of an <i>icon view</i> in which the items are displayed with icons like files in a file manager. By default, the list view is in <tt>ListMode</tt>. To change the view mode, use the <a href="qlistview.html#viewMode-prop">setViewMode</a>() function, and to determine the current view mode, use <a href="qlistview.html#viewMode-prop">viewMode</a>().</p>
 
129
<p>Items in these views are laid out in the direction specified by the <a href="qlistview.html#flow-prop">flow</a>() of the list view. The items may be fixed in place, or allowed to move, depending on the view's <a href="qlistview.html#movement-prop">movement</a>() state.</p>
 
130
<p>If the items in the model cannot be completely laid out in the direction of flow, they can be wrapped at the boundary of the view widget; this depends on <a href="qlistview.html#isWrapping-prop">isWrapping</a>(). This property is useful when the items are being represented by an icon view.</p>
 
131
<p>The <a href="qlistview.html#resizeMode-prop">resizeMode</a>() and <a href="qlistview.html#layoutMode-prop">layoutMode</a>() govern how and when the items are laid out. Items are spaced according to their <a href="qlistview.html#spacing-prop">spacing</a>(), and can exist within a notional grid of size specified by <a href="qlistview.html#gridSize-prop">gridSize</a>(). The items can be rendered as large or small icons depending on their <a href="qabstractitemview.html#iconSize-prop">iconSize</a>().</p>
 
132
<p>See also <a href="model-view-programming.html">Model/View Programming</a>.</p>
 
133
<hr />
 
134
<h2>Member Type Documentation</h2>
 
135
<h3 class="fn"><a name="Flow-enum"></a>enum QListView::Flow</h3>
 
136
<table border="1" cellpadding="2" cellspacing="1" width="100%">
 
137
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
 
138
<tr><td valign="top"><tt>QListView::LeftToRight</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The items are laid out in the view from the left to the right.</td></tr>
 
139
<tr><td valign="top"><tt>QListView::TopToBottom</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The items are laid out in the view from the top to the bottom.</td></tr>
 
140
</table>
 
141
<h3 class="fn"><a name="LayoutMode-enum"></a>enum QListView::LayoutMode</h3>
 
142
<table border="1" cellpadding="2" cellspacing="1" width="100%">
 
143
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
 
144
<tr><td valign="top"><tt>QListView::SinglePass</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The items are laid out all at once.</td></tr>
 
145
<tr><td valign="top"><tt>QListView::Batched</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The items are laid out in batches of 100 items.</td></tr>
 
146
</table>
 
147
<h3 class="fn"><a name="Movement-enum"></a>enum QListView::Movement</h3>
 
148
<table border="1" cellpadding="2" cellspacing="1" width="100%">
 
149
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
 
150
<tr><td valign="top"><tt>QListView::Static</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The items cannot be moved by the user.</td></tr>
 
151
<tr><td valign="top"><tt>QListView::Free</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The items can be moved freely by the user.</td></tr>
 
152
<tr><td valign="top"><tt>QListView::Snap</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">The items snap to the specified grid when moved; see <a href="qlistview.html#gridSize-prop">setGridSize</a>().</td></tr>
 
153
</table>
 
154
<h3 class="fn"><a name="ResizeMode-enum"></a>enum QListView::ResizeMode</h3>
 
155
<table border="1" cellpadding="2" cellspacing="1" width="100%">
 
156
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
 
157
<tr><td valign="top"><tt>QListView::Fixed</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The items will only be laid out the first time the view is shown.</td></tr>
 
158
<tr><td valign="top"><tt>QListView::Adjust</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The items will be laid out every time the view is resized.</td></tr>
 
159
</table>
 
160
<h3 class="fn"><a name="ViewMode-enum"></a>enum QListView::ViewMode</h3>
 
161
<table border="1" cellpadding="2" cellspacing="1" width="100%">
 
162
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
 
163
<tr><td valign="top"><tt>QListView::ListMode</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The items are layed out using <a href="qlistview.html#Flow-enum">TopToBottom</a> flow, with Small size and Static movement</td></tr>
 
164
<tr><td valign="top"><tt>QListView::IconMode</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The items are layed out using <a href="qlistview.html#Flow-enum">LeftToRight</a> flow, with Large size and Free movement</td></tr>
 
165
</table>
 
166
<hr />
 
167
<h2>Property Documentation</h2>
 
168
<h3 class="fn"><a name="flow-prop"></a>flow : <a href="qlistview.html#Flow-enum">Flow</a></h3>
 
169
<p>This property holds which direction the items layout should flow.</p>
 
170
<p>If this property is <tt>LeftToRight</tt>, the items will be laid out left to right. If the <a href="qlistview.html#isWrapping-prop">isWrapping</a> property is true, the layout will wrap when it reaches the right side of the visible area. If this property is <tt>TopToBottom</tt>, the items will be laid out from the top of the visible area, wrapping when it reaches the bottom.</p>
 
171
<p>Setting this property when the view is visible will cause the items to be laid out again.</p>
 
172
<p>Access functions:</p>
 
173
<ul>
 
174
<li><div class="fn"/><b>Flow flow () const</b></li>
 
175
<li><div class="fn"/><b>void setFlow ( Flow <i>flow</i> )</b></li>
 
176
</ul>
 
177
<h3 class="fn"><a name="gridSize-prop"></a>gridSize : <a href="qsize.html">QSize</a></h3>
 
178
<p>This property holds the size of the layout grid.</p>
 
179
<p>This property is the size of the grid in which the items are laid out. The default is an empty size which means that there is no grid and the layout is not done in a grid. Setting this property to a non-empty size switches on the grid layout. (When a grid layout is in force the <a href="qlistview.html#spacing-prop">spacing</a> property is ignored.)</p>
 
180
<p>Setting this property when the view is visible will cause the items to be laid out again.</p>
 
181
<p>Access functions:</p>
 
182
<ul>
 
183
<li><div class="fn"/><b>QSize gridSize () const</b></li>
 
184
<li><div class="fn"/><b>void setGridSize ( const QSize &amp; <i>size</i> )</b></li>
 
185
</ul>
 
186
<h3 class="fn"><a name="isWrapping-prop"></a>isWrapping : bool</h3>
 
187
<p>This property holds whether the items layout should wrap.</p>
 
188
<p>This property holds whether the layout should wrap when there is no more space in the visible area. The point at which the layout wraps depends on the <a href="qlistview.html#flow-prop">flow</a> property.</p>
 
189
<p>Setting this property when the view is visible will cause the items to be laid out again.</p>
 
190
<p>Access functions:</p>
 
191
<ul>
 
192
<li><div class="fn"/><b>bool isWrapping () const</b></li>
 
193
<li><div class="fn"/><b>void setWrapping ( bool <i>enable</i> )</b></li>
 
194
</ul>
 
195
<h3 class="fn"><a name="layoutMode-prop"></a>layoutMode : <a href="qlistview.html#LayoutMode-enum">LayoutMode</a></h3>
 
196
<p>This property holds whether the layout of items should happen immediately or be delayed.</p>
 
197
<p>This property holds the layout mode for the items. When the mode is <tt>Instant</tt> (the default), the items are laid out all in one go. When the mode is <tt>Batched</tt>, the items are laid out in batches of 100 items, while processing events. This makes it possible to instantly view and interact with the visible items while the rest are being laid out.</p>
 
198
<p>Access functions:</p>
 
199
<ul>
 
200
<li><div class="fn"/><b>LayoutMode layoutMode () const</b></li>
 
201
<li><div class="fn"/><b>void setLayoutMode ( LayoutMode <i>mode</i> )</b></li>
 
202
</ul>
 
203
<h3 class="fn"><a name="modelColumn-prop"></a>modelColumn : int</h3>
 
204
<p>This property holds the column in the model that is visible.</p>
 
205
<p>Access functions:</p>
 
206
<ul>
 
207
<li><div class="fn"/><b>int modelColumn () const</b></li>
 
208
<li><div class="fn"/><b>void setModelColumn ( int <i>column</i> )</b></li>
 
209
</ul>
 
210
<h3 class="fn"><a name="movement-prop"></a>movement : <a href="qlistview.html#Movement-enum">Movement</a></h3>
 
211
<p>This property holds whether the items can be moved freely, are snapped to a grid, or cannot be moved at all.</p>
 
212
<p>This property determines how the user can move the items in the view. <tt>Static</tt> means that the items can't be moved the user. <tt>Free</tt> means that the user can drag and drop the items to any position in the view. <tt>Snap</tt> means that the user can drag and drop the items, but only to the positions in a notional grid signified by the <a href="qlistview.html#gridSize-prop">gridSize</a> property.</p>
 
213
<p>Setting this property when the view is visible will cause the items to be laid out again.</p>
 
214
<p>Access functions:</p>
 
215
<ul>
 
216
<li><div class="fn"/><b>Movement movement () const</b></li>
 
217
<li><div class="fn"/><b>void setMovement ( Movement <i>movement</i> )</b></li>
 
218
</ul>
 
219
<p>See also <a href="qlistview.html#gridSize-prop">gridSize</a>.</p>
 
220
<h3 class="fn"><a name="resizeMode-prop"></a>resizeMode : <a href="qlistview.html#ResizeMode-enum">ResizeMode</a></h3>
 
221
<p>This property holds whether the items are laid out again when the view is resized.</p>
 
222
<p>If this property is <tt>Adjust</tt>, the items will be laid out again when the view is resized. If the value is <tt>Fixed</tt>, the items will not be laid out when the view is resized.</p>
 
223
<p>Access functions:</p>
 
224
<ul>
 
225
<li><div class="fn"/><b>ResizeMode resizeMode () const</b></li>
 
226
<li><div class="fn"/><b>void setResizeMode ( ResizeMode <i>mode</i> )</b></li>
 
227
</ul>
 
228
<h3 class="fn"><a name="spacing-prop"></a>spacing : int</h3>
 
229
<p>This property holds the space between items in the layout.</p>
 
230
<p>This property is the size of the empty space between items in the layout. This property is ignored if the items are laid out in a grid.</p>
 
231
<p>Setting this property when the view is visible will cause the items to be laid out again.</p>
 
232
<p>Access functions:</p>
 
233
<ul>
 
234
<li><div class="fn"/><b>int spacing () const</b></li>
 
235
<li><div class="fn"/><b>void setSpacing ( int <i>space</i> )</b></li>
 
236
</ul>
 
237
<h3 class="fn"><a name="viewMode-prop"></a>viewMode : <a href="qlistview.html#ViewMode-enum">ViewMode</a></h3>
 
238
<p>This property holds the view mode of the QListView.</p>
 
239
<p>This property will change the other unset properties to conform with the set view mode. Properties that have already been set will not be changed, unless <a href="qlistview.html#clearPropertyFlags">clearPropertyFlags</a>() has been called.</p>
 
240
<p>Access functions:</p>
 
241
<ul>
 
242
<li><div class="fn"/><b>ViewMode viewMode () const</b></li>
 
243
<li><div class="fn"/><b>void setViewMode ( ViewMode <i>mode</i> )</b></li>
 
244
</ul>
 
245
<hr />
 
246
<h2>Member Function Documentation</h2>
 
247
<h3 class="fn"><a name="QListView"></a>QListView::QListView ( <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0 )</h3>
 
248
<p>Creates a new <a href="qlistview.html">QListView</a> with the given <i>parent</i> to view a model. Use <a href="qabstractitemview.html#setModel">setModel</a>() to set the model.</p>
 
249
<h3 class="fn"><a name="dtor.QListView"></a>QListView::~QListView ()</h3>
 
250
<p>Destroys the view.</p>
 
251
<h3 class="fn"><a name="clearPropertyFlags"></a>void QListView::clearPropertyFlags ()</h3>
 
252
<p>Clears the property flags. See <a href="qlistview.html#viewMode-prop">viewMode</a>.</p>
 
253
<h3 class="fn"><a name="isRowHidden"></a>bool QListView::isRowHidden ( int <i>row</i> ) const</h3>
 
254
<p>Returns true if the <i>row</i> is hidden, otherwise returns false.</p>
 
255
<h3 class="fn"><a name="rectForIndex"></a><a href="qrect.html">QRect</a> QListView::rectForIndex ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> ) const&nbsp;&nbsp;<tt> [protected]</tt></h3>
 
256
<p>Returns the rectangle of the item at position <i>index</i> in the model. The rectangle is in contents coordinates.</p>
 
257
<h3 class="fn"><a name="setRowHidden"></a>void QListView::setRowHidden ( int <i>row</i>, bool <i>hide</i> )</h3>
 
258
<p>If <i>hide</i> is true the <i>row</i> will be hidden, otherwise the <i>row</i> will be shown.</p>
 
259
<p /><address><hr /><div align="center">
 
260
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
261
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
262
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
263
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
264
</tr></table></div></address></body>
 
265
</html>