This file is indexed.

/usr/share/qt5/doc/qtquickcontrols/qml-qtquick-controls-treeview.html is in qtquickcontrols5-doc-html 5.5.1-1ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qtquickcontrols-treeview.qdoc -->
  <title>TreeView QML Type | Qt Quick Controls 5.5</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li>Qt 5.5</li>
<li><a href="qtquickcontrols-index.html">Qt Quick Controls</a></li>
<li><a href="qtquick-controls-qmlmodule.html">QML Types</a></li>
<li>TreeView QML Type</li>
<li id="buildversion">Qt 5.5.1 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#methods">Methods</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">TreeView QML Type</h1>
<span class="subtitle"></span>
<!-- $$$TreeView-brief -->
<p>Provides a tree view with scroll bars, styling and header sections. <a href="#details">More...</a></p>
<!-- @@@TreeView -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import QtQuick.Controls 1.4</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 5.5</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-qtquick-controls-scrollview.html">ScrollView</a></p>
</td></tr></table></div><ul>
<li><a href="qml-qtquick-controls-treeview-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#alternatingRowColors-prop">alternatingRowColors</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#backgroundVisible-prop">backgroundVisible</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#columnCount-prop">columnCount</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#contentFooter-prop">contentFooter</a></b></b> : Component</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#contentHeader-prop">contentHeader</a></b></b> : Component</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#currentIndex-prop">currentIndex</a></b></b> : QModelIndex</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#headerDelegate-prop">headerDelegate</a></b></b> : Component</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#headerVisible-prop">headerVisible</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#itemDelegate-prop">itemDelegate</a></b></b> : Component</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#model-prop">model</a></b></b> : QAbstractItemModel</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#rowDelegate-prop">rowDelegate</a></b></b> : Component</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#section-prop">section</a></b></b><ul>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#section.property-prop">section.property</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#section.criteria-prop">section.criteria</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#section.delegate-prop">section.delegate</a></b></b> : Component</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#section.labelPositioning-prop">section.labelPositioning</a></b></b> : enumeration</li>
</ul>
</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#selection-prop">selection</a></b></b> : ItemSelectionModel</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#selectionMode-prop">selectionMode</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#sortIndicatorColumn-prop">sortIndicatorColumn</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#sortIndicatorOrder-prop">sortIndicatorOrder</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#sortIndicatorVisible-prop">sortIndicatorVisible</a></b></b> : bool</li>
</ul>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#activated-signal">activated</a></b></b>(QModelIndex <i> index</i>)</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#clicked-signal">clicked</a></b></b>(QModelIndex <i> index</i>)</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#collapsed-signal">collapsed</a></b></b>(QModelIndex <i> index</i>)</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#doubleClicked-signal">doubleClicked</a></b></b>(QModelIndex <i> index</i>)</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#expanded-signal">expanded</a></b></b>(QModelIndex <i> index</i>)</li>
<li class="fn"><b><b><a href="qml-qtquick-controls-treeview.html#pressAndHold-signal">pressAndHold</a></b></b>(QModelIndex <i> index</i>)</li>
</ul>
<a name="methods"></a>
<h2 id="methods">Methods</h2>
<ul>
<li class="fn">TableViewColumn <b><b><a href="qml-qtquick-controls-treeview.html#addColumn-method">addColumn</a></b></b>(object <i> column</i>)</li>
<li class="fn">void <b><b><a href="qml-qtquick-controls-treeview.html#collapse-method">collapse</a></b></b>(QModelIndex <i> index</i>)</li>
<li class="fn">void <b><b><a href="qml-qtquick-controls-treeview.html#expand-method">expand</a></b></b>(QModelIndex <i> index</i>)</li>
<li class="fn">TableViewColumn <b><b><a href="qml-qtquick-controls-treeview.html#getColumn-method">getColumn</a></b></b>(int <i> index</i>)</li>
<li class="fn">QModelIndex <b><b><a href="qml-qtquick-controls-treeview.html#indexAt-method">indexAt</a></b></b>(int <i> x</i>, int <i> y</i>)</li>
<li class="fn">TableViewColumn <b><b><a href="qml-qtquick-controls-treeview.html#insertColumn-method">insertColumn</a></b></b>(int <i> index</i>, object <i> column</i>)</li>
<li class="fn">bool <b><b><a href="qml-qtquick-controls-treeview.html#isExpanded-method">isExpanded</a></b></b>(QModelIndex <i> index</i>)</li>
<li class="fn">void <b><b><a href="qml-qtquick-controls-treeview.html#moveColumn-method">moveColumn</a></b></b>(int <i> from</i>, int <i> to</i>)</li>
<li class="fn">void <b><b><a href="qml-qtquick-controls-treeview.html#removeColumn-method">removeColumn</a></b></b>(int <i> index</i>)</li>
<li class="fn">void <b><b><a href="qml-qtquick-controls-treeview.html#resizeColumnsToContents-method">resizeColumnsToContents</a></b></b>()</li>
</ul>
<!-- $$$TreeView-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
</p>
<p class="centerAlign"><img src="images/treeview.png" alt="" /></p><p>A <a href="qml-qtquick-controls-treeview.html">TreeView</a> implements a tree representation of items from a model.</p>
<p>Data for each row in the <a href="qml-qtquick-controls-treeview.html">TreeView</a> is provided by the model. <a href="qml-qtquick-controls-treeview.html">TreeView</a> accepts models derived from the <a href="../qtcore/qabstractitemmodel.html">QAbstractItemModel</a> class.</p>
<p>You provide title and size of a column header by adding a <a href="qml-qtquick-controls-tableviewcolumn.html">TableViewColumn</a> as demonstrated below.</p>
<pre class="cpp">TreeView {
    TableViewColumn {
        title: <span class="string">&quot;Name&quot;</span>
        role: <span class="string">&quot;fileName&quot;</span>
        width: <span class="number">300</span>
    }
    TableViewColumn {
        title: <span class="string">&quot;Permissions&quot;</span>
        role: <span class="string">&quot;filePermissions&quot;</span>
        width: <span class="number">100</span>
    }
    model: fileSystemModel
}</pre>
<p>The header sections are attached to values in the <a href="qml-qtquick-controls-treeview.html#model-prop">model</a> by defining the model role they attach to. Each property in the model will then be shown in their corresponding column.</p>
<p>You can customize the look by overriding the <a href="qml-qtquick-controls-treeview.html#itemDelegate-prop">itemDelegate</a>, rowDelegate, or headerDelegate properties.</p>
<p>The view itself does not provide sorting. This has to be done on the model itself. However you can provide sorting on the model, and enable sort indicators on headers.</p>
<ul>
<li>int sortIndicatorColumn - The index of the current sort column</li>
<li>bool sortIndicatorVisible - Whether the sort indicator should be enabled</li>
<li>enum sortIndicatorOrder - Qt.AscendingOrder or Qt.DescendingOrder depending on state</li>
</ul>
<p>You can create a custom appearance for a <a href="qml-qtquick-controls-treeview.html">TreeView</a> by assigning a <a href="qml-qtquick-controls-styles-treeviewstyle.html">TreeViewStyle</a>.</p>
<!-- @@@TreeView -->
<h2>Property Documentation</h2>
<!-- $$$alternatingRowColors -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="alternatingRowColors-prop"><td class="tblQmlPropNode"><p><a name="alternatingRowColors-prop"></a><span class="name">alternatingRowColors</span> : <span class="type">bool</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property is set to <code>true</code> if the view alternates the row color. The default value is <code>true</code>.</p>
</div></div><!-- @@@alternatingRowColors -->
<br/>
<!-- $$$backgroundVisible -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="backgroundVisible-prop"><td class="tblQmlPropNode"><p><a name="backgroundVisible-prop"></a><span class="name">backgroundVisible</span> : <span class="type">bool</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property determines if the background should be filled or not.</p>
<p>The default value is <code>true</code>.</p>
<p><b>Note: </b>The <a href="qml-qtquick-controls-treeview.html#rowDelegate-prop">rowDelegate</a> is not affected by this property</p></div></div><!-- @@@backgroundVisible -->
<br/>
<!-- $$$columnCount -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="columnCount-prop"><td class="tblQmlPropNode"><p><a name="columnCount-prop"></a><span class="qmlreadonly">read-only</span><span class="name">columnCount</span> : <span class="type">int</span></p></td></tr></table></div></div><div class="qmldoc"><p>The current number of columns</p>
</div></div><!-- @@@columnCount -->
<br/>
<!-- $$$contentFooter -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="contentFooter-prop"><td class="tblQmlPropNode"><p><a name="contentFooter-prop"></a><span class="name">contentFooter</span> : <span class="type"><a href="../qtqml/qml-qtqml-component.html">Component</a></span></p></td></tr></table></div></div><div class="qmldoc"><p>This is the content footer of the view.</p>
</div></div><!-- @@@contentFooter -->
<br/>
<!-- $$$contentHeader -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="contentHeader-prop"><td class="tblQmlPropNode"><p><a name="contentHeader-prop"></a><span class="name">contentHeader</span> : <span class="type"><a href="../qtqml/qml-qtqml-component.html">Component</a></span></p></td></tr></table></div></div><div class="qmldoc"><p>This is the content header of the view.</p>
</div></div><!-- @@@contentHeader -->
<br/>
<!-- $$$currentIndex -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="currentIndex-prop"><td class="tblQmlPropNode"><p><a name="currentIndex-prop"></a><span class="name">currentIndex</span> : <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span></p></td></tr></table></div></div><div class="qmldoc"><p>The model index of the current row in the tree view.</p>
</div></div><!-- @@@currentIndex -->
<br/>
<!-- $$$headerDelegate -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="headerDelegate-prop"><td class="tblQmlPropNode"><p><a name="headerDelegate-prop"></a><span class="name">headerDelegate</span> : <span class="type"><a href="../qtqml/qml-qtqml-component.html">Component</a></span></p></td></tr></table></div></div><div class="qmldoc"><p>This property defines a delegate to draw a header.</p>
<p>In the header delegate you have access to the following special properties:</p>
<ul>
<li>styleData.value - the value or text for this item</li>
<li>styleData.column - the index of the column</li>
<li>styleData.pressed - true when the column is being pressed</li>
<li>styleData.containsMouse - true when the column is under the mouse</li>
<li>styleData.textAlignment - the horizontal text alignment of the column (since QtQuickControls 1.1)</li>
</ul>
</div></div><!-- @@@headerDelegate -->
<br/>
<!-- $$$headerVisible -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="headerVisible-prop"><td class="tblQmlPropNode"><p><a name="headerVisible-prop"></a><span class="name">headerVisible</span> : <span class="type">bool</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property determines if the header is visible. The default value is <code>true</code>.</p>
</div></div><!-- @@@headerVisible -->
<br/>
<!-- $$$itemDelegate -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="itemDelegate-prop"><td class="tblQmlPropNode"><p><a name="itemDelegate-prop"></a><span class="name">itemDelegate</span> : <span class="type"><a href="../qtqml/qml-qtqml-component.html">Component</a></span></p></td></tr></table></div></div><div class="qmldoc"><p>This property defines a delegate to draw a specific cell.</p>
<p>In the item delegate you have access to the following special properties:</p>
<ul>
<li>styleData.selected - if the item is currently selected</li>
<li>styleData.value - the value or text for this item</li>
<li>styleData.textColor - the default text color for an item</li>
<li>styleData.row - the index of the view row</li>
<li>styleData.column - the index of the view column</li>
<li>styleData.elideMode - the elide mode of the column</li>
<li>styleData.textAlignment - the horizontal text alignment of the column</li>
<li>styleData.pressed - true when the item is pressed</li>
<li>styleData.hasActiveFocus - true when the row has focus</li>
<li>styleData.index - the <a href="../qtcore/qmodelindex.html">QModelIndex</a> of the current item in the model</li>
<li>styleData.depth - the depth of the current item in the model</li>
<li>styleData.<a href="qml-qtquick-controls-treeview.html#isExpanded-method">isExpanded</a> - true when the item is expanded</li>
<li>styleData.hasChildren - true if the model index of the current item has or can have children</li>
<li>styleData.hasSibling - true if the model index of the current item has a sibling</li>
</ul>
<p>Example:</p>
<pre class="cpp">itemDelegate: Item {
    Text {
        anchors<span class="operator">.</span>verticalCenter: parent<span class="operator">.</span>verticalCenter
        color: styleData<span class="operator">.</span>textColor
        elide: styleData<span class="operator">.</span>elideMode
        text: styleData<span class="operator">.</span>value
    }
}</pre>
<p><b>Note: </b>For performance reasons, created delegates can be recycled across multiple table rows. This implies that when you make use of implicit properties such as <code>styleData.row</code> or <code>model</code>, these values can change after the delegate has been constructed. This means that you should not assume that content is fixed when <code>Component.onCompleted</code> is called, but instead rely on bindings to such properties.</p></div></div><!-- @@@itemDelegate -->
<br/>
<!-- $$$model -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="model-prop"><td class="tblQmlPropNode"><p><a name="model-prop"></a><span class="name">model</span> : <span class="type"><a href="../qtcore/qabstractitemmodel.html">QAbstractItemModel</a></span></p></td></tr></table></div></div><div class="qmldoc"><p>This property holds the model providing data for the tree view.</p>
<p>The model provides the set of data that is displayed by the view. The <a href="qml-qtquick-controls-treeview.html">TreeView</a> accept models derived from the <a href="../qtcore/qabstractitemmodel.html">QAbstractItemModel</a> class.</p>
</div></div><!-- @@@model -->
<br/>
<!-- $$$rowDelegate -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="rowDelegate-prop"><td class="tblQmlPropNode"><p><a name="rowDelegate-prop"></a><span class="name">rowDelegate</span> : <span class="type"><a href="../qtqml/qml-qtqml-component.html">Component</a></span></p></td></tr></table></div></div><div class="qmldoc"><p>This property defines a delegate to draw a row.</p>
<p>In the row delegate you have access to the following special properties:</p>
<ul>
<li>styleData.alternate - true when the row uses the alternate background color</li>
<li>styleData.selected - true when the row is currently selected</li>
<li>styleData.row - the index of the row</li>
<li>styleData.hasActiveFocus - true when the row has focus (since <a href="../qtqml/qtquick-qmlmodule.html">QtQuick</a>.Controls 1.3)</li>
<li>styleData.pressed - true when the row is pressed (since <a href="../qtqml/qtquick-qmlmodule.html">QtQuick</a>.Controls 1.3)</li>
</ul>
<p><b>Note: </b>For performance reasons, created delegates can be recycled across multiple table rows. This implies that when you make use of implicit properties such as <code>styleData.row</code> or <code>model</code>, these values can change after the delegate has been constructed. This means that you should not assume that content is fixed when <code>Component.onCompleted</code> is called, but instead rely on bindings to such properties.</p></div></div><!-- @@@rowDelegate -->
<br/>
<!-- $$$section -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="even" id="section-prop"><th class="centerAlign"><p><a name="section-prop"></a><b>section group</b></p></th></tr><tr valign="top" class="odd" id="section.property-prop"><td class="tblQmlPropNode"><p><a name="section.property-prop"></a><span class="name">section.property</span> : <span class="type">string</span></p></td></tr><tr valign="top" class="odd" id="section.criteria-prop"><td class="tblQmlPropNode"><p><a name="section.criteria-prop"></a><span class="name">section.criteria</span> : <span class="type">enumeration</span></p></td></tr><tr valign="top" class="odd" id="section.delegate-prop"><td class="tblQmlPropNode"><p><a name="section.delegate-prop"></a><span class="name">section.delegate</span> : <span class="type"><a href="../qtqml/qml-qtqml-component.html">Component</a></span></p></td></tr><tr valign="top" class="odd" id="section.labelPositioning-prop"><td class="tblQmlPropNode"><p><a name="section.labelPositioning-prop"></a><span class="name">section.labelPositioning</span> : <span class="type">enumeration</span></p></td></tr></table></div></div><div class="qmldoc"><p>These properties determine the section labels.</p>
<p><b>See also </b><a href="../qtquick/qml-qtquick-listview.html#section-attached-prop">ListView::section</a>.</p>
</div></div><!-- @@@section -->
<br/>
<!-- $$$selection -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="selection-prop"><td class="tblQmlPropNode"><p><a name="selection-prop"></a><span class="name">selection</span> : <span class="type"><a href="../qtqml/qml-qtqml-models-itemselectionmodel.html">ItemSelectionModel</a></span></p></td></tr></table></div></div><div class="qmldoc"><p>By default the selection model is <code>null</code> and only single selection is supported.</p>
<p>To use a different selection mode as described in <a href="qml-qtquick-controls-treeview.html#selectionMode-prop">selectionMode</a>, an <a href="../qtqml/qml-qtqml-models-itemselectionmodel.html">ItemSelectionModel</a> must by set to the selection.</p>
<p>For example:</p>
<pre class="cpp">TreeView {
   model: myModel
   selection: ItemSelectionModel {
        model: myModel
   }
   TableViewColumn {
       role: <span class="string">&quot;name&quot;</span>
       title: <span class="string">&quot;Name
   }
}
</span></pre>
<p><b>See also </b><a href="qml-qtquick-controls-treeview.html#selectionMode-prop">selectionMode</a>.</p>
</div></div><!-- @@@selection -->
<br/>
<!-- $$$selectionMode -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="selectionMode-prop"><td class="tblQmlPropNode"><p><a name="selectionMode-prop"></a><span class="name">selectionMode</span> : <span class="type">int</span></p></td></tr></table></div></div><div class="qmldoc"><p>This enum indicates how the view responds to user selections:</p>
<p>The possible modes are:</p>
<ul>
<li>SelectionMode.NoSelection - Items cannot be selected.</li>
<li>SelectionMode.SingleSelection - When the user selects an item, any already-selected item becomes unselected, and the user cannot unselect the selected item. (Default)</li>
<li>SelectionMode.MultiSelection - 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.</li>
<li>SelectionMode.ExtendedSelection - 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.</li>
<li>SelectionMode.ContiguousSelection - 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.</li>
</ul>
<p>This QML property was introduced in  QtQuick.Controls 1.1.</p>
</div></div><!-- @@@selectionMode -->
<br/>
<!-- $$$sortIndicatorColumn -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="sortIndicatorColumn-prop"><td class="tblQmlPropNode"><p><a name="sortIndicatorColumn-prop"></a><span class="name">sortIndicatorColumn</span> : <span class="type">int</span></p></td></tr></table></div></div><div class="qmldoc"><p>Index of the current sort column. The default value is <code>0</code>.</p>
</div></div><!-- @@@sortIndicatorColumn -->
<br/>
<!-- $$$sortIndicatorOrder -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="sortIndicatorOrder-prop"><td class="tblQmlPropNode"><p><a name="sortIndicatorOrder-prop"></a><span class="name">sortIndicatorOrder</span> : <span class="type">int</span></p></td></tr></table></div></div><div class="qmldoc"><p>This sets the sorting order of the sort indicator The allowed values are:</p>
<ul>
<li>Qt.AscendingOrder - the default</li>
<li>Qt.DescendingOrder</li>
</ul>
</div></div><!-- @@@sortIndicatorOrder -->
<br/>
<!-- $$$sortIndicatorVisible -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="sortIndicatorVisible-prop"><td class="tblQmlPropNode"><p><a name="sortIndicatorVisible-prop"></a><span class="name">sortIndicatorVisible</span> : <span class="type">bool</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property shows or hides the sort indicator The default value is <code>false</code>.</p>
<p><b>Note: </b>The view itself does not sort the data.</p></div></div><!-- @@@sortIndicatorVisible -->
<br/>
<h2>Signal Documentation</h2>
<!-- $$$activated -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="activated-signal"><td class="tblQmlFuncNode"><p><a name="activated-signal"></a><span class="name">activated</span>(<span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span><i> index</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>Emitted when the user activates a row in the tree by mouse or keyboard interaction. Mouse activation is triggered by single- or double-clicking, depending on the platform.</p>
<p><i>index</i> is the model index of the activated row in the tree.</p>
<p><b>Note: </b>This signal is only emitted for mouse interaction that is not blocked in the row or item delegate.</p><p>The corresponding handler is <code>onActivated</code>.</p>
</div></div><!-- @@@activated -->
<br/>
<!-- $$$clicked -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="clicked-signal"><td class="tblQmlFuncNode"><p><a name="clicked-signal"></a><span class="name">clicked</span>(<span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span><i> index</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>Emitted when the user clicks a valid row in the tree by single clicking</p>
<p><i>index</i> is the model index of the clicked row in the tree.</p>
<p><b>Note: </b>This signal is only emitted if the row or item delegate does not accept mouse events.</p><p>The corresponding handler is <code>onClicked</code>.</p>
</div></div><!-- @@@clicked -->
<br/>
<!-- $$$collapsed -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="collapsed-signal"><td class="tblQmlFuncNode"><p><a name="collapsed-signal"></a><span class="name">collapsed</span>(<span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span><i> index</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>Emitted when a valid row in the tree is collapsed, hiding its children.</p>
<p><i>index</i> is the model index of the collapsed row in the tree.</p>
<p><b>Note: </b>This signal is only emitted if the row or item delegate does not accept mouse events.</p><p>The corresponding handler is <code>onCollapsed</code>.</p>
</div></div><!-- @@@collapsed -->
<br/>
<!-- $$$doubleClicked -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="doubleClicked-signal"><td class="tblQmlFuncNode"><p><a name="doubleClicked-signal"></a><span class="name">doubleClicked</span>(<span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span><i> index</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>Emitted when the user presses and holds a valid row in the tree.</p>
<p><i>index</i> is the model index of the double clicked row in the tree.</p>
<p><b>Note: </b>This signal is only emitted if the row or item delegate does not accept mouse events.</p><p>The corresponding handler is <code>onPressAndHold</code>.</p>
</div></div><!-- @@@doubleClicked -->
<br/>
<!-- $$$expanded -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="expanded-signal"><td class="tblQmlFuncNode"><p><a name="expanded-signal"></a><span class="name">expanded</span>(<span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span><i> index</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>Emitted when a valid row in the tree is expanded, displaying its children.</p>
<p><i>index</i> is the model index of the expanded row in the tree.</p>
<p><b>Note: </b>This signal is only emitted if the row or item delegate does not accept mouse events.</p><p>The corresponding handler is <code>onExpanded</code>.</p>
</div></div><!-- @@@expanded -->
<br/>
<!-- $$$pressAndHold -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="pressAndHold-signal"><td class="tblQmlFuncNode"><p><a name="pressAndHold-signal"></a><span class="name">pressAndHold</span>(<span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span><i> index</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>Emitted when the user presses and holds a valid row in the tree.</p>
<p><i>index</i> is the model index of the pressed row in the tree.</p>
<p><b>Note: </b>This signal is only emitted if the row or item delegate does not accept mouse events.</p><p>The corresponding handler is <code>onPressAndHold</code>.</p>
</div></div><!-- @@@pressAndHold -->
<br/>
<h2>Method Documentation</h2>
<!-- $$$addColumn -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="addColumn-method"><td class="tblQmlFuncNode"><p><a name="addColumn-method"></a><span class="type"><a href="qml-qtquick-controls-tableviewcolumn.html">TableViewColumn</a></span> <span class="name">addColumn</span>(<span class="type">object</span><i> column</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>Adds a <i>column</i> and returns the added column.</p>
<p>The <i>column</i> argument can be an instance of <a href="qml-qtquick-controls-tableviewcolumn.html">TableViewColumn</a>, or a Component. The component has to contain a <a href="qml-qtquick-controls-tableviewcolumn.html">TableViewColumn</a>. Otherwise <code>null</code> is returned.</p>
</div></div><!-- @@@addColumn -->
<br/>
<!-- $$$collapse -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="collapse-method"><td class="tblQmlFuncNode"><p><a name="collapse-method"></a><span class="type">void</span> <span class="name">collapse</span>(<span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span><i> index</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>Collapses the model item specified by the index.</p>
<p><b>See also </b><a href="qml-qtquick-controls-treeview.html#collapsed-signal">collapsed</a> and <a href="qml-qtquick-controls-treeview.html#isExpanded-method">isExpanded</a>.</p>
</div></div><!-- @@@collapse -->
<br/>
<!-- $$$expand -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="expand-method"><td class="tblQmlFuncNode"><p><a name="expand-method"></a><span class="type">void</span> <span class="name">expand</span>(<span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span><i> index</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>Expands the model item specified by the index.</p>
<p><b>See also </b><a href="qml-qtquick-controls-treeview.html#expanded-signal">expanded</a> and <a href="qml-qtquick-controls-treeview.html#isExpanded-method">isExpanded</a>.</p>
</div></div><!-- @@@expand -->
<br/>
<!-- $$$getColumn -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="getColumn-method"><td class="tblQmlFuncNode"><p><a name="getColumn-method"></a><span class="type"><a href="qml-qtquick-controls-tableviewcolumn.html">TableViewColumn</a></span> <span class="name">getColumn</span>(<span class="type">int</span><i> index</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>Returns the column at the given <i>index</i> or <code>null</code> if the <i>index</i> is invalid.</p>
</div></div><!-- @@@getColumn -->
<br/>
<!-- $$$indexAt -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="indexAt-method"><td class="tblQmlFuncNode"><p><a name="indexAt-method"></a><span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> <span class="name">indexAt</span>(<span class="type">int</span><i> x</i>, <span class="type">int</span><i> y</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>Returns the model index of the visible row at the point <i>x</i>, <i>y</i> in content coordinates. If there is no visible row at the point specified, an invalid <a href="../qtcore/qmodelindex.html">QModelIndex</a> is returned.</p>
<p><b>Note: </b>This method should only be called after the component has completed.</p></div></div><!-- @@@indexAt -->
<br/>
<!-- $$$insertColumn -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="insertColumn-method"><td class="tblQmlFuncNode"><p><a name="insertColumn-method"></a><span class="type"><a href="qml-qtquick-controls-tableviewcolumn.html">TableViewColumn</a></span> <span class="name">insertColumn</span>(<span class="type">int</span><i> index</i>, <span class="type">object</span><i> column</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>Inserts a <i>column</i> at the given <i>index</i> and returns the inserted column.</p>
<p>The <i>column</i> argument can be an instance of <a href="qml-qtquick-controls-tableviewcolumn.html">TableViewColumn</a>, or a Component. The component has to contain a <a href="qml-qtquick-controls-tableviewcolumn.html">TableViewColumn</a>. Otherwise <code>null</code> is returned.</p>
</div></div><!-- @@@insertColumn -->
<br/>
<!-- $$$isExpanded -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="isExpanded-method"><td class="tblQmlFuncNode"><p><a name="isExpanded-method"></a><span class="type">bool</span> <span class="name">isExpanded</span>(<span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span><i> index</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>Returns true if the model item index is expanded; otherwise returns false.</p>
<p><b>See also </b><a href="qml-qtquick-controls-treeview.html#expanded-signal">expanded</a> and <a href="qml-qtquick-controls-treeview.html#expand-method">expand</a>.</p>
</div></div><!-- @@@isExpanded -->
<br/>
<!-- $$$moveColumn -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="moveColumn-method"><td class="tblQmlFuncNode"><p><a name="moveColumn-method"></a><span class="type">void</span> <span class="name">moveColumn</span>(<span class="type">int</span><i> from</i>, <span class="type">int</span><i> to</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>Moves a column <i>from</i> index <i>to</i> another.</p>
</div></div><!-- @@@moveColumn -->
<br/>
<!-- $$$removeColumn -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="removeColumn-method"><td class="tblQmlFuncNode"><p><a name="removeColumn-method"></a><span class="type">void</span> <span class="name">removeColumn</span>(<span class="type">int</span><i> index</i>)</p></td></tr></table></div></div><div class="qmldoc"><p>Removes and destroys a column at the given <i>index</i>.</p>
</div></div><!-- @@@removeColumn -->
<br/>
<!-- $$$resizeColumnsToContents -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="resizeColumnsToContents-method"><td class="tblQmlFuncNode"><p><a name="resizeColumnsToContents-method"></a><span class="type">void</span> <span class="name">resizeColumnsToContents</span>()</p></td></tr></table></div></div><div class="qmldoc"><p>Resizes all columns to ensure that the column contents and the headers will fit.</p>
<p>This QML method was introduced in  QtQuick.Controls 1.2.</p>
</div></div><!-- @@@resizeColumnsToContents -->
<br/>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>