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
|
<?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>QStandardItemModel 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">  </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QStandardItemModel Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QStandardItemModel class provides a generic model for
storing custom data. <a href="#details">More...</a></p>
<p>Inherits <a href="qabstractitemmodel.html">QAbstractItemModel</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qstandarditemmodel.html#QStandardItemModel">__init__</a></b> (<i>self</i>, QObject <i>parent</i> = None)</li><li><div class="fn" /><b><a href="qstandarditemmodel.html#QStandardItemModel-2">__init__</a></b> (<i>self</i>, int <i>rows</i>, int <i>columns</i>, QObject <i>parent</i> = None)</li><li><div class="fn" /><b><a href="qstandarditemmodel.html#appendColumn">appendColumn</a></b> (<i>self</i>, list-of-QStandardItem <i>items</i>)</li><li><div class="fn" /><b><a href="qstandarditemmodel.html#appendRow">appendRow</a></b> (<i>self</i>, list-of-QStandardItem <i>items</i>)</li><li><div class="fn" /><b><a href="qstandarditemmodel.html#appendRow-2">appendRow</a></b> (<i>self</i>, QStandardItem <i>aitem</i>)</li><li><div class="fn" /><b><a href="qstandarditemmodel.html#clear">clear</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qstandarditemmodel.html#columnCount">columnCount</a></b> (<i>self</i>, QModelIndex <i>parent</i> = QModelIndex())</li><li><div class="fn" />QVariant <b><a href="qstandarditemmodel.html#data">data</a></b> (<i>self</i>, QModelIndex <i>index</i>, int <i>role</i> = Qt.DisplayRole)</li><li><div class="fn" />bool <b><a href="qstandarditemmodel.html#dropMimeData">dropMimeData</a></b> (<i>self</i>, QMimeData <i>data</i>, Qt.DropAction <i>action</i>, int <i>row</i>, int <i>column</i>, QModelIndex <i>parent</i>)</li><li><div class="fn" />list-of-QStandardItem <b><a href="qstandarditemmodel.html#findItems">findItems</a></b> (<i>self</i>, QString <i>text</i>, Qt.MatchFlags <i>flags</i> = Qt.MatchExactly, int <i>column</i> = 0)</li><li><div class="fn" />Qt.ItemFlags <b><a href="qstandarditemmodel.html#flags">flags</a></b> (<i>self</i>, QModelIndex <i>index</i>)</li><li><div class="fn" />bool <b><a href="qstandarditemmodel.html#hasChildren">hasChildren</a></b> (<i>self</i>, QModelIndex <i>parent</i> = QModelIndex())</li><li><div class="fn" />QVariant <b><a href="qstandarditemmodel.html#headerData">headerData</a></b> (<i>self</i>, int <i>section</i>, Qt.Orientation <i>orientation</i>, int <i>role</i> = Qt.DisplayRole)</li><li><div class="fn" />QStandardItem <b><a href="qstandarditemmodel.html#horizontalHeaderItem">horizontalHeaderItem</a></b> (<i>self</i>, int <i>column</i>)</li><li><div class="fn" />QModelIndex <b><a href="qstandarditemmodel.html#index">index</a></b> (<i>self</i>, int <i>row</i>, int <i>column</i>, QModelIndex <i>parent</i> = QModelIndex())</li><li><div class="fn" />QModelIndex <b><a href="qstandarditemmodel.html#indexFromItem">indexFromItem</a></b> (<i>self</i>, QStandardItem <i>item</i>)</li><li><div class="fn" /><b><a href="qstandarditemmodel.html#insertColumn">insertColumn</a></b> (<i>self</i>, int <i>column</i>, list-of-QStandardItem <i>items</i>)</li><li><div class="fn" />bool <b><a href="qstandarditemmodel.html#insertColumn-2">insertColumn</a></b> (<i>self</i>, int <i>column</i>, QModelIndex <i>parent</i> = QModelIndex())</li><li><div class="fn" />bool <b><a href="qstandarditemmodel.html#insertColumns">insertColumns</a></b> (<i>self</i>, int <i>column</i>, int <i>count</i>, QModelIndex <i>parent</i> = QModelIndex())</li><li><div class="fn" /><b><a href="qstandarditemmodel.html#insertRow">insertRow</a></b> (<i>self</i>, int <i>row</i>, list-of-QStandardItem <i>items</i>)</li><li><div class="fn" /><b><a href="qstandarditemmodel.html#insertRow-2">insertRow</a></b> (<i>self</i>, int <i>arow</i>, QStandardItem <i>aitem</i>)</li><li><div class="fn" />bool <b><a href="qstandarditemmodel.html#insertRow-3">insertRow</a></b> (<i>self</i>, int <i>row</i>, QModelIndex <i>parent</i> = QModelIndex())</li><li><div class="fn" />bool <b><a href="qstandarditemmodel.html#insertRows">insertRows</a></b> (<i>self</i>, int <i>row</i>, int <i>count</i>, QModelIndex <i>parent</i> = QModelIndex())</li><li><div class="fn" />QStandardItem <b><a href="qstandarditemmodel.html#invisibleRootItem">invisibleRootItem</a></b> (<i>self</i>)</li><li><div class="fn" />QStandardItem <b><a href="qstandarditemmodel.html#item">item</a></b> (<i>self</i>, int <i>row</i>, int <i>column</i> = 0)</li><li><div class="fn" />dict-of-int-QVariant <b><a href="qstandarditemmodel.html#itemData">itemData</a></b> (<i>self</i>, QModelIndex <i>index</i>)</li><li><div class="fn" />QStandardItem <b><a href="qstandarditemmodel.html#itemFromIndex">itemFromIndex</a></b> (<i>self</i>, QModelIndex <i>index</i>)</li><li><div class="fn" />QStandardItem <b><a href="qstandarditemmodel.html#itemPrototype">itemPrototype</a></b> (<i>self</i>)</li><li><div class="fn" />QMimeData <b><a href="qstandarditemmodel.html#mimeData">mimeData</a></b> (<i>self</i>, list-of-QModelIndex <i>indexes</i>)</li><li><div class="fn" />QStringList <b><a href="qstandarditemmodel.html#mimeTypes">mimeTypes</a></b> (<i>self</i>)</li><li><div class="fn" />QModelIndex <b><a href="qstandarditemmodel.html#parent">parent</a></b> (<i>self</i>, QModelIndex <i>child</i>)</li><li><div class="fn" />QObject <b><a href="qstandarditemmodel.html#parent-2">parent</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qstandarditemmodel.html#removeColumns">removeColumns</a></b> (<i>self</i>, int <i>column</i>, int <i>count</i>, QModelIndex <i>parent</i> = QModelIndex())</li><li><div class="fn" />bool <b><a href="qstandarditemmodel.html#removeRows">removeRows</a></b> (<i>self</i>, int <i>row</i>, int <i>count</i>, QModelIndex <i>parent</i> = QModelIndex())</li><li><div class="fn" />int <b><a href="qstandarditemmodel.html#rowCount">rowCount</a></b> (<i>self</i>, QModelIndex <i>parent</i> = QModelIndex())</li><li><div class="fn" /><b><a href="qstandarditemmodel.html#setColumnCount">setColumnCount</a></b> (<i>self</i>, int <i>columns</i>)</li><li><div class="fn" />bool <b><a href="qstandarditemmodel.html#setData">setData</a></b> (<i>self</i>, QModelIndex <i>index</i>, QVariant <i>value</i>, int <i>role</i> = Qt.EditRole)</li><li><div class="fn" />bool <b><a href="qstandarditemmodel.html#setHeaderData">setHeaderData</a></b> (<i>self</i>, int <i>section</i>, Qt.Orientation <i>orientation</i>, QVariant <i>value</i>, int <i>role</i> = Qt.EditRole)</li><li><div class="fn" /><b><a href="qstandarditemmodel.html#setHorizontalHeaderItem">setHorizontalHeaderItem</a></b> (<i>self</i>, int <i>column</i>, QStandardItem <i>item</i>)</li><li><div class="fn" /><b><a href="qstandarditemmodel.html#setHorizontalHeaderLabels">setHorizontalHeaderLabels</a></b> (<i>self</i>, QStringList <i>labels</i>)</li><li><div class="fn" /><b><a href="qstandarditemmodel.html#setItem">setItem</a></b> (<i>self</i>, int <i>row</i>, int <i>column</i>, QStandardItem <i>item</i>)</li><li><div class="fn" /><b><a href="qstandarditemmodel.html#setItem-2">setItem</a></b> (<i>self</i>, int <i>arow</i>, QStandardItem <i>aitem</i>)</li><li><div class="fn" />bool <b><a href="qstandarditemmodel.html#setItemData">setItemData</a></b> (<i>self</i>, QModelIndex <i>index</i>, dict-of-int-QVariant <i>roles</i>)</li><li><div class="fn" /><b><a href="qstandarditemmodel.html#setItemPrototype">setItemPrototype</a></b> (<i>self</i>, QStandardItem <i>item</i>)</li><li><div class="fn" /><b><a href="qstandarditemmodel.html#setRowCount">setRowCount</a></b> (<i>self</i>, int <i>rows</i>)</li><li><div class="fn" /><b><a href="qstandarditemmodel.html#setSortRole">setSortRole</a></b> (<i>self</i>, int <i>role</i>)</li><li><div class="fn" /><b><a href="qstandarditemmodel.html#setVerticalHeaderItem">setVerticalHeaderItem</a></b> (<i>self</i>, int <i>row</i>, QStandardItem <i>item</i>)</li><li><div class="fn" /><b><a href="qstandarditemmodel.html#setVerticalHeaderLabels">setVerticalHeaderLabels</a></b> (<i>self</i>, QStringList <i>labels</i>)</li><li><div class="fn" /><b><a href="qstandarditemmodel.html#sort">sort</a></b> (<i>self</i>, int <i>column</i>, Qt.SortOrder <i>order</i> = Qt.AscendingOrder)</li><li><div class="fn" />int <b><a href="qstandarditemmodel.html#sortRole">sortRole</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.DropActions <b><a href="qstandarditemmodel.html#supportedDropActions">supportedDropActions</a></b> (<i>self</i>)</li><li><div class="fn" />list-of-QStandardItem <b><a href="qstandarditemmodel.html#takeColumn">takeColumn</a></b> (<i>self</i>, int <i>column</i>)</li><li><div class="fn" />QStandardItem <b><a href="qstandarditemmodel.html#takeHorizontalHeaderItem">takeHorizontalHeaderItem</a></b> (<i>self</i>, int <i>column</i>)</li><li><div class="fn" />QStandardItem <b><a href="qstandarditemmodel.html#takeItem">takeItem</a></b> (<i>self</i>, int <i>row</i>, int <i>column</i> = 0)</li><li><div class="fn" />list-of-QStandardItem <b><a href="qstandarditemmodel.html#takeRow">takeRow</a></b> (<i>self</i>, int <i>row</i>)</li><li><div class="fn" />QStandardItem <b><a href="qstandarditemmodel.html#takeVerticalHeaderItem">takeVerticalHeaderItem</a></b> (<i>self</i>, int <i>row</i>)</li><li><div class="fn" />QStandardItem <b><a href="qstandarditemmodel.html#verticalHeaderItem">verticalHeaderItem</a></b> (<i>self</i>, int <i>row</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qstandarditemmodel.html#itemChanged">itemChanged</a></b> (QStandardItem *)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QStandardItemModel class provides a generic model for
storing custom data.</p>
<p>QStandardItemModel can be used as a repository for standard Qt
data types. It 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</a> framework.</p>
<p>QStandardItemModel provides a classic item-based approach to
working with the model. The items in a QStandardItemModel are
provided by <a href="qstandarditem.html">QStandardItem</a>.</p>
<p>QStandardItemModel implements the <a href="qabstractitemmodel.html">QAbstractItemModel</a> interface, which
means that the model can be used to provide data in any view that
supports that interface (such as <a href="qlistview.html">QListView</a>, <a href="qtableview.html">QTableView</a> and <a href="qtreeview.html">QTreeView</a>, and your own custom views). For
performance and flexibility, you may want to subclass <a href="qabstractitemmodel.html">QAbstractItemModel</a> to provide support
for different kinds of data repositories. For example, the <a class="obsolete" href="qdirmodel.html">QDirModel<sup>(obsolete)</sup></a> provides a model
interface to the underlying file system.</p>
<p>When you want a list or tree, you typically create an empty
QStandardItemModel and use <a href="qstandarditemmodel.html#appendRow">appendRow</a>() to add items to
the model, and <a href="qstandarditemmodel.html#item">item</a>() to
access an item. If your model represents a table, you typically
pass the dimensions of the table to the QStandardItemModel
constructor and use <a href="qstandarditemmodel.html#setItem">setItem</a>() to position items
into the table. You can also use <a href="qstandarditemmodel.html#setRowCount">setRowCount</a>() and
<a href="qstandarditemmodel.html#setColumnCount">setColumnCount</a>()
to alter the dimensions of the model. To insert items, use <a href="qstandarditemmodel.html#insertRow">insertRow</a>() or <a href="qstandarditemmodel.html#insertColumn">insertColumn</a>(), and to
remove items, use <a href="qabstractitemmodel.html#removeRow">removeRow</a>() or <a href="qabstractitemmodel.html#removeColumn">removeColumn</a>().</p>
<p>You can set the header labels of your model with <a href="qstandarditemmodel.html#setHorizontalHeaderLabels">setHorizontalHeaderLabels</a>()
and <a href="qstandarditemmodel.html#setVerticalHeaderLabels">setVerticalHeaderLabels</a>().</p>
<p>You can search for items in the model with <a href="qstandarditemmodel.html#findItems">findItems</a>(), and sort the
model by calling <a href="qstandarditemmodel.html#sort">sort</a>().</p>
<p>Call <a href="qstandarditemmodel.html#clear">clear</a>() to
remove all items from the model.</p>
<p>An example usage of QStandardItemModel to create a table:</p>
<pre class="cpp">
<span class="type">QStandardItemModel</span> model(<span class="number">4</span><span class="operator">,</span> <span class="number">4</span>);
<span class="keyword">for</span> (<span class="type">int</span> row <span class="operator">=</span> <span class="number">0</span>; row <span class="operator"><</span> <span class="number">4</span>; <span class="operator">+</span><span class="operator">+</span>row) {
<span class="keyword">for</span> (<span class="type">int</span> column <span class="operator">=</span> <span class="number">0</span>; column <span class="operator"><</span> <span class="number">4</span>; <span class="operator">+</span><span class="operator">+</span>column) {
<span class="type"><a href="qstandarditem.html">QStandardItem</a></span> <span class="operator">*</span>item <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qstandarditem.html">QStandardItem</a></span>(<span class="type"><a href="qstring.html">QString</a></span>(<span class="string">"row %0, column %1"</span>)<span class="operator">.</span>arg(row)<span class="operator">.</span>arg(column));
model<span class="operator">.</span>setItem(row<span class="operator">,</span> column<span class="operator">,</span> item);
}
}
</pre>
<p>An example usage of QStandardItemModel to create a tree:</p>
<pre class="cpp">
<span class="type">QStandardItemModel</span> model;
<span class="type"><a href="qstandarditem.html">QStandardItem</a></span> <span class="operator">*</span>parentItem <span class="operator">=</span> model<span class="operator">.</span><a href="qstandarditemmodel.html#invisibleRootItem">invisibleRootItem</a>();
<span class="keyword">for</span> (<span class="type">int</span> i <span class="operator">=</span> <span class="number">0</span>; i <span class="operator"><</span> <span class="number">4</span>; <span class="operator">+</span><span class="operator">+</span>i) {
<span class="type"><a href="qstandarditem.html">QStandardItem</a></span> <span class="operator">*</span>item <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qstandarditem.html">QStandardItem</a></span>(<span class="type"><a href="qstring.html">QString</a></span>(<span class="string">"item %0"</span>)<span class="operator">.</span>arg(i));
parentItem<span class="operator">-</span><span class="operator">></span>appendRow(item);
parentItem <span class="operator">=</span> item;
}
</pre>
<p>After setting the model on a view, you typically want to react
to user actions, such as an item being clicked. Since a <a href="qabstractitemview.html">QAbstractItemView</a> provides <a href="qmodelindex.html">QModelIndex</a>-based signals and functions, you
need a way to obtain the <a href="qstandarditem.html">QStandardItem</a> that corresponds to a given
<a href="qmodelindex.html">QModelIndex</a>, and vice versa.
<a href="qstandarditemmodel.html#itemFromIndex">itemFromIndex</a>()
and <a href="qstandarditemmodel.html#indexFromItem">indexFromItem</a>() provide
this mapping. Typical usage of <a href="qstandarditemmodel.html#itemFromIndex">itemFromIndex</a>()
includes obtaining the item at the current index in a view, and
obtaining the item that corresponds to an index carried by a
<a href="qabstractitemview.html">QAbstractItemView</a> signal, such
as <a href="qabstractitemview.html#clicked">QAbstractItemView.clicked</a>().
First you connect the view's signal to a slot in your class:</p>
<pre class="cpp">
<span class="type"><a href="qtreeview.html">QTreeView</a></span> <span class="operator">*</span>treeView <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qtreeview.html">QTreeView</a></span>(<span class="keyword">this</span>);
treeView<span class="operator">-</span><span class="operator">></span>setModel(myStandardItemModel);
<a href="qobject.html#connect">connect</a>(treeView<span class="operator">,</span> SIGNAL(clicked(<span class="type"><a href="qmodelindex.html">QModelIndex</a></span>))<span class="operator">,</span>
<span class="keyword">this</span><span class="operator">,</span> SLOT(clicked(<span class="type"><a href="qmodelindex.html">QModelIndex</a></span>)));
</pre>
<p>When you receive the signal, you call <a href="qstandarditemmodel.html#itemFromIndex">itemFromIndex</a>() on the
given model index to get a pointer to the item:</p>
<pre class="cpp">
<span class="type">void</span> MyWidget<span class="operator">.</span>clicked(<span class="keyword">const</span> <span class="type"><a href="qmodelindex.html">QModelIndex</a></span> <span class="operator">&</span>index)
{
<span class="type"><a href="qstandarditem.html">QStandardItem</a></span> <span class="operator">*</span>item <span class="operator">=</span> myStandardItemModel<span class="operator">-</span><span class="operator">></span>itemFromIndex(index);
<span class="comment">// Do stuff with the item ...</span>
}
</pre>
<p>Conversely, you must obtain the <a href="qmodelindex.html">QModelIndex</a> of an item when you want to
invoke a model/view function that takes an index as argument. You
can obtain the index either by using the model's <a href="qstandarditemmodel.html#indexFromItem">indexFromItem</a>()
function, or, equivalently, by calling <a href="qstandarditem.html#index">QStandardItem.index</a>():</p>
<pre class="cpp">
treeView<span class="operator">-</span><span class="operator">></span>scrollTo(item<span class="operator">-</span><span class="operator">></span>index());
</pre>
<p>You are, of course, not required to use the item-based approach;
you could instead rely entirely on the <a href="qabstractitemmodel.html">QAbstractItemModel</a> interface when
working with the model, or use a combination of the two as
appropriate.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QStandardItemModel" />QStandardItemModel.__init__ (<i>self</i>, <a href="qobject.html">QObject</a> <i>parent</i> = 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 a new item model with the given <i>parent</i>.</p>
<h3 class="fn"><a name="QStandardItemModel-2" />QStandardItemModel.__init__ (<i>self</i>, int <i>rows</i>, int <i>columns</i>, <a href="qobject.html">QObject</a> <i>parent</i> = 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 a new item model that initially has <i>rows</i> rows
and <i>columns</i> columns, and that has the given
<i>parent</i>.</p>
<h3 class="fn"><a name="appendColumn" />QStandardItemModel.appendColumn (<i>self</i>, list-of-QStandardItem <i>items</i>)</h3><p>The <i>items</i> argument has it's ownership transferred to Qt.</p><p>Appends a column containing <i>items</i>. If necessary, the row
count is increased to the size of <i>items</i>.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#insertColumn">insertColumn</a>() and
<a href="qstandarditemmodel.html#appendRow">appendRow</a>().</p>
<h3 class="fn"><a name="appendRow" />QStandardItemModel.appendRow (<i>self</i>, list-of-QStandardItem <i>items</i>)</h3><p>The <i>items</i> argument has it's ownership transferred to Qt.</p><p>Appends a row containing <i>items</i>. If necessary, the column
count is increased to the size of <i>items</i>.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#insertRow">insertRow</a>() and <a href="qstandarditemmodel.html#appendColumn">appendColumn</a>().</p>
<h3 class="fn"><a name="appendRow-2" />QStandardItemModel.appendRow (<i>self</i>, <a href="qstandarditem.html">QStandardItem</a> <i>aitem</i>)</h3><p>The <i>aitem</i> argument has it's ownership transferred to Qt.</p><p>This is an overloaded function.</p>
<p>When building a list or a tree that has only one column, this
function provides a convenient way to append a single new
<i>item</i>.</p>
<p>This function was introduced in Qt 4.2.</p>
<h3 class="fn"><a name="clear" />QStandardItemModel.clear (<i>self</i>)</h3><p>Removes all items (including header items) from the model and
sets the number of rows and columns to zero.</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#removeColumns">removeColumns</a>() and
<a href="qstandarditemmodel.html#removeRows">removeRows</a>().</p>
<h3 class="fn"><a name="columnCount" />int QStandardItemModel.columnCount (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a> <i>parent</i> = QModelIndex())</h3><p>Reimplemented from <a href="qabstractitemmodel.html#columnCount">QAbstractItemModel.columnCount</a>().</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#setColumnCount">setColumnCount</a>().</p>
<h3 class="fn"><a name="data" />QVariant QStandardItemModel.data (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a> <i>index</i>, int <i>role</i> = Qt.DisplayRole)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#data">QAbstractItemModel.data</a>().</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#setData">setData</a>().</p>
<h3 class="fn"><a name="dropMimeData" />bool QStandardItemModel.dropMimeData (<i>self</i>, <a href="qmimedata.html">QMimeData</a> <i>data</i>, <a href="qt.html#DropAction-enum">Qt.DropAction</a> <i>action</i>, int <i>row</i>, int <i>column</i>, <a href="qmodelindex.html">QModelIndex</a> <i>parent</i>)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#dropMimeData">QAbstractItemModel.dropMimeData</a>().</p>
<h3 class="fn"><a name="findItems" />list-of-QStandardItem QStandardItemModel.findItems (<i>self</i>, QString <i>text</i>, <a href="qt-matchflags.html">Qt.MatchFlags</a> <i>flags</i> = Qt.MatchExactly, int <i>column</i> = 0)</h3><p>Returns a list of items that match the given <i>text</i>, using
the given <i>flags</i>, in the given <i>column</i>.</p>
<p>This function was introduced in Qt 4.2.</p>
<h3 class="fn"><a name="flags" /><a href="qt-itemflags.html">Qt.ItemFlags</a> QStandardItemModel.flags (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a> <i>index</i>)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#flags">QAbstractItemModel.flags</a>().</p>
<h3 class="fn"><a name="hasChildren" />bool QStandardItemModel.hasChildren (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a> <i>parent</i> = QModelIndex())</h3><p>Reimplemented from <a href="qabstractitemmodel.html#hasChildren">QAbstractItemModel.hasChildren</a>().</p>
<h3 class="fn"><a name="headerData" />QVariant QStandardItemModel.headerData (<i>self</i>, int <i>section</i>, <a href="qt.html#Orientation-enum">Qt.Orientation</a> <i>orientation</i>, int <i>role</i> = Qt.DisplayRole)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#headerData">QAbstractItemModel.headerData</a>().</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#setHeaderData">setHeaderData</a>().</p>
<h3 class="fn"><a name="horizontalHeaderItem" /><a href="qstandarditem.html">QStandardItem</a> QStandardItemModel.horizontalHeaderItem (<i>self</i>, int <i>column</i>)</h3><p>Returns the horizontal header item for <i>column</i> if one has
been set; otherwise returns 0.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#setHorizontalHeaderItem">setHorizontalHeaderItem</a>()
and <a href="qstandarditemmodel.html#verticalHeaderItem">verticalHeaderItem</a>().</p>
<h3 class="fn"><a name="index" /><a href="qmodelindex.html">QModelIndex</a> QStandardItemModel.index (<i>self</i>, int <i>row</i>, int <i>column</i>, <a href="qmodelindex.html">QModelIndex</a> <i>parent</i> = QModelIndex())</h3><p>Reimplemented from <a href="qabstractitemmodel.html#index">QAbstractItemModel.index</a>().</p>
<h3 class="fn"><a name="indexFromItem" /><a href="qmodelindex.html">QModelIndex</a> QStandardItemModel.indexFromItem (<i>self</i>, <a href="qstandarditem.html">QStandardItem</a> <i>item</i>)</h3><p>Returns the <a href="qmodelindex.html">QModelIndex</a>
associated with the given <i>item</i>.</p>
<p>Use this function when you want to perform an operation that
requires the <a href="qmodelindex.html">QModelIndex</a> of the
item, such as <a href="qabstractitemview.html#scrollTo">QAbstractItemView.scrollTo</a>().
<a href="qstandarditem.html#index">QStandardItem.index</a>() is
provided as convenience; it is equivalent to calling this
function.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#itemFromIndex">itemFromIndex</a>() and
<a href="qstandarditem.html#index">QStandardItem.index</a>().</p>
<h3 class="fn"><a name="insertColumn" />QStandardItemModel.insertColumn (<i>self</i>, int <i>column</i>, list-of-QStandardItem <i>items</i>)</h3><p>The <i>items</i> argument has it's ownership transferred to Qt.</p><p>Inserts a column at <i>column</i> containing <i>items</i>. If
necessary, the row count is increased to the size of
<i>items</i>.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#takeColumn">takeColumn</a>(), <a href="qstandarditemmodel.html#appendColumn">appendColumn</a>(), and
<a href="qstandarditemmodel.html#insertRow">insertRow</a>().</p>
<h3 class="fn"><a name="insertColumn-2" />bool QStandardItemModel.insertColumn (<i>self</i>, int <i>column</i>, <a href="qmodelindex.html">QModelIndex</a> <i>parent</i> = QModelIndex())</h3><p>Inserts a single column before the given <i>column</i> in the
child items of the <i>parent</i> specified. Returns true if the
column is inserted; otherwise returns false.</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#insertColumns">insertColumns</a>(),
<a href="qstandarditemmodel.html#insertRow">insertRow</a>(), and
<a href="qabstractitemmodel.html#removeColumn">removeColumn</a>().</p>
<h3 class="fn"><a name="insertColumns" />bool QStandardItemModel.insertColumns (<i>self</i>, int <i>column</i>, int <i>count</i>, <a href="qmodelindex.html">QModelIndex</a> <i>parent</i> = QModelIndex())</h3><p>Reimplemented from <a href="qabstractitemmodel.html#insertColumns">QAbstractItemModel.insertColumns</a>().</p>
<h3 class="fn"><a name="insertRow" />QStandardItemModel.insertRow (<i>self</i>, int <i>row</i>, list-of-QStandardItem <i>items</i>)</h3><p>The <i>items</i> argument has it's ownership transferred to Qt.</p><p>Inserts a row at <i>row</i> containing <i>items</i>. If
necessary, the column count is increased to the size of
<i>items</i>.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#takeRow">takeRow</a>(), <a href="qstandarditemmodel.html#appendRow">appendRow</a>(), and <a href="qstandarditemmodel.html#insertColumn">insertColumn</a>().</p>
<h3 class="fn"><a name="insertRow-2" />QStandardItemModel.insertRow (<i>self</i>, int <i>arow</i>, <a href="qstandarditem.html">QStandardItem</a> <i>aitem</i>)</h3><p>The <i>aitem</i> argument has it's ownership transferred to Qt.</p><p>Inserts a single row before the given <i>row</i> in the child
items of the <i>parent</i> specified. Returns true if the row is
inserted; otherwise returns false.</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#insertRows">insertRows</a>(), <a href="qstandarditemmodel.html#insertColumn">insertColumn</a>(), and
<a href="qabstractitemmodel.html#removeRow">removeRow</a>().</p>
<h3 class="fn"><a name="insertRow-3" />bool QStandardItemModel.insertRow (<i>self</i>, int <i>row</i>, <a href="qmodelindex.html">QModelIndex</a> <i>parent</i> = QModelIndex())</h3><p>This is an overloaded function.</p>
<p>Inserts a row at <i>row</i> containing <i>item</i>.</p>
<p>When building a list or a tree that has only one column, this
function provides a convenient way to append a single new item.</p>
<p>This function was introduced in Qt 4.2.</p>
<h3 class="fn"><a name="insertRows" />bool QStandardItemModel.insertRows (<i>self</i>, int <i>row</i>, int <i>count</i>, <a href="qmodelindex.html">QModelIndex</a> <i>parent</i> = QModelIndex())</h3><p>Reimplemented from <a href="qabstractitemmodel.html#insertRows">QAbstractItemModel.insertRows</a>().</p>
<h3 class="fn"><a name="invisibleRootItem" /><a href="qstandarditem.html">QStandardItem</a> QStandardItemModel.invisibleRootItem (<i>self</i>)</h3><p>Returns the model's invisible root item.</p>
<p>The invisible root item provides access to the model's top-level
items through the <a href="qstandarditem.html">QStandardItem</a>
API, making it possible to write functions that can treat top-level
items and their children in a uniform way; for example, recursive
functions involving a tree model.</p>
<p><b>Note:</b> Calling <a href="qabstractitemmodel.html#index">index()</a> on the <a href="qstandarditem.html">QStandardItem</a> object retrieved from this
function is not valid.</p>
<p>This function was introduced in Qt 4.2.</p>
<h3 class="fn"><a name="item" /><a href="qstandarditem.html">QStandardItem</a> QStandardItemModel.item (<i>self</i>, int <i>row</i>, int <i>column</i> = 0)</h3><p>Returns the item for the given <i>row</i> and <i>column</i> if
one has been set; otherwise returns 0.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#setItem">setItem</a>(), <a href="qstandarditemmodel.html#takeItem">takeItem</a>(), and <a href="qstandarditemmodel.html#itemFromIndex">itemFromIndex</a>().</p>
<h3 class="fn"><a name="itemData" />dict-of-int-QVariant QStandardItemModel.itemData (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a> <i>index</i>)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#itemData">QAbstractItemModel.itemData</a>().</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#setItemData">setItemData</a>().</p>
<h3 class="fn"><a name="itemFromIndex" /><a href="qstandarditem.html">QStandardItem</a> QStandardItemModel.itemFromIndex (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a> <i>index</i>)</h3><p>Returns a pointer to the <a href="qstandarditem.html">QStandardItem</a> associated with the given
<i>index</i>.</p>
<p>Calling this function is typically the initial step when
processing <a href="qmodelindex.html">QModelIndex</a>-based signals
from a view, such as <a href="qabstractitemview.html#activated">QAbstractItemView.activated</a>().
In your slot, you call itemFromIndex(), with the <a href="qmodelindex.html">QModelIndex</a> carried by the signal as
argument, to obtain a pointer to the corresponding <a href="qstandarditem.html">QStandardItem</a>.</p>
<p>Note that this function will lazily create an item for the index
(using <a href="qstandarditemmodel.html#itemPrototype">itemPrototype</a>()), and
set it in the parent item's child table, if no item already exists
at that index.</p>
<p>If <i>index</i> is an invalid index, this function returns
0.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#indexFromItem">indexFromItem</a>().</p>
<h3 class="fn"><a name="itemPrototype" /><a href="qstandarditem.html">QStandardItem</a> QStandardItemModel.itemPrototype (<i>self</i>)</h3><p>Returns the item prototype used by the model. The model uses the
item prototype as an item factory when it needs to construct new
items on demand (for instance, when a view or item delegate calls
<a href="qstandarditemmodel.html#setData">setData</a>()).</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#setItemPrototype">setItemPrototype</a>().</p>
<h3 class="fn"><a name="mimeData" /><a href="qmimedata.html">QMimeData</a> QStandardItemModel.mimeData (<i>self</i>, list-of-QModelIndex <i>indexes</i>)</h3><p>The <i>QMimeData</i> result</p><p>Reimplemented from <a href="qabstractitemmodel.html#mimeData">QAbstractItemModel.mimeData</a>().</p>
<h3 class="fn"><a name="mimeTypes" />QStringList QStandardItemModel.mimeTypes (<i>self</i>)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#mimeTypes">QAbstractItemModel.mimeTypes</a>().</p>
<h3 class="fn"><a name="parent" /><a href="qmodelindex.html">QModelIndex</a> QStandardItemModel.parent (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a> <i>child</i>)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#parent">QAbstractItemModel.parent</a>().</p>
<h3 class="fn"><a name="parent-2" /><a href="qobject.html">QObject</a> QStandardItemModel.parent (<i>self</i>)</h3><h3 class="fn"><a name="removeColumns" />bool QStandardItemModel.removeColumns (<i>self</i>, int <i>column</i>, int <i>count</i>, <a href="qmodelindex.html">QModelIndex</a> <i>parent</i> = QModelIndex())</h3><p>Reimplemented from <a href="qabstractitemmodel.html#removeColumns">QAbstractItemModel.removeColumns</a>().</p>
<h3 class="fn"><a name="removeRows" />bool QStandardItemModel.removeRows (<i>self</i>, int <i>row</i>, int <i>count</i>, <a href="qmodelindex.html">QModelIndex</a> <i>parent</i> = QModelIndex())</h3><p>Reimplemented from <a href="qabstractitemmodel.html#removeRows">QAbstractItemModel.removeRows</a>().</p>
<h3 class="fn"><a name="rowCount" />int QStandardItemModel.rowCount (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a> <i>parent</i> = QModelIndex())</h3><p>Reimplemented from <a href="qabstractitemmodel.html#rowCount">QAbstractItemModel.rowCount</a>().</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#setRowCount">setRowCount</a>().</p>
<h3 class="fn"><a name="setColumnCount" />QStandardItemModel.setColumnCount (<i>self</i>, int <i>columns</i>)</h3><p>Sets the number of columns in this model to <i>columns</i>. If
this is less than <a href="qstandarditemmodel.html#columnCount">columnCount</a>(), the data
in the unwanted columns is discarded.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#columnCount">columnCount</a>() and
<a href="qstandarditemmodel.html#setRowCount">setRowCount</a>().</p>
<h3 class="fn"><a name="setData" />bool QStandardItemModel.setData (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a> <i>index</i>, QVariant <i>value</i>, int <i>role</i> = Qt.EditRole)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#setData">QAbstractItemModel.setData</a>().</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#data">data</a>().</p>
<h3 class="fn"><a name="setHeaderData" />bool QStandardItemModel.setHeaderData (<i>self</i>, int <i>section</i>, <a href="qt.html#Orientation-enum">Qt.Orientation</a> <i>orientation</i>, QVariant <i>value</i>, int <i>role</i> = Qt.EditRole)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#setHeaderData">QAbstractItemModel.setHeaderData</a>().</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#headerData">headerData</a>().</p>
<h3 class="fn"><a name="setHorizontalHeaderItem" />QStandardItemModel.setHorizontalHeaderItem (<i>self</i>, int <i>column</i>, <a href="qstandarditem.html">QStandardItem</a> <i>item</i>)</h3><p>The <i>item</i> argument has it's ownership transferred to Qt.</p><p>Sets the horizontal header item for <i>column</i> to
<i>item</i>. The model takes ownership of the item. If necessary,
the column count is increased to fit the item. The previous header
item (if there was one) is deleted.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#horizontalHeaderItem">horizontalHeaderItem</a>(),
<a href="qstandarditemmodel.html#setHorizontalHeaderLabels">setHorizontalHeaderLabels</a>(),
and <a href="qstandarditemmodel.html#setVerticalHeaderItem">setVerticalHeaderItem</a>().</p>
<h3 class="fn"><a name="setHorizontalHeaderLabels" />QStandardItemModel.setHorizontalHeaderLabels (<i>self</i>, QStringList <i>labels</i>)</h3><p>Sets the horizontal header labels using <i>labels</i>. If
necessary, the column count is increased to the size of
<i>labels</i>.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#setHorizontalHeaderItem">setHorizontalHeaderItem</a>().</p>
<h3 class="fn"><a name="setItem" />QStandardItemModel.setItem (<i>self</i>, int <i>row</i>, int <i>column</i>, <a href="qstandarditem.html">QStandardItem</a> <i>item</i>)</h3><p>The <i>item</i> argument has it's ownership transferred to Qt.</p><p>Sets the item for the given <i>row</i> and <i>column</i> to
<i>item</i>. The model takes ownership of the item. If necessary,
the row count and column count are increased to fit the item. The
previous item at the given location (if there was one) is
deleted.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#item">item</a>().</p>
<h3 class="fn"><a name="setItem-2" />QStandardItemModel.setItem (<i>self</i>, int <i>arow</i>, <a href="qstandarditem.html">QStandardItem</a> <i>aitem</i>)</h3><p>The <i>aitem</i> argument has it's ownership transferred to Qt.</p><p>This is an overloaded function.</p>
<h3 class="fn"><a name="setItemData" />bool QStandardItemModel.setItemData (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a> <i>index</i>, dict-of-int-QVariant <i>roles</i>)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#setItemData">QAbstractItemModel.setItemData</a>().</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#itemData">itemData</a>().</p>
<h3 class="fn"><a name="setItemPrototype" />QStandardItemModel.setItemPrototype (<i>self</i>, <a href="qstandarditem.html">QStandardItem</a> <i>item</i>)</h3><p>The <i>item</i> argument has it's ownership transferred to Qt.</p><p>Sets the item prototype for the model to the specified
<i>item</i>. The model takes ownership of the prototype.</p>
<p>The item prototype acts as a <a href="qstandarditem.html">QStandardItem</a> factory, by relying on the
<a href="qstandarditem.html#clone">QStandardItem.clone</a>()
function. To provide your own prototype, subclass <a href="qstandarditem.html">QStandardItem</a>, reimplement <a href="qstandarditem.html#clone">QStandardItem.clone</a>() and set the
prototype to be an instance of your custom class. Whenever <a href="qstandarditemmodel.html">QStandardItemModel</a> needs to create an
item on demand (for instance, when a view or item delegate calls
<a href="qstandarditemmodel.html#setData">setData</a>())), the new
items will be instances of your custom class.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#itemPrototype">itemPrototype</a>() and
<a href="qstandarditem.html#clone">QStandardItem.clone</a>().</p>
<h3 class="fn"><a name="setRowCount" />QStandardItemModel.setRowCount (<i>self</i>, int <i>rows</i>)</h3><p>Sets the number of rows in this model to <i>rows</i>. If this is
less than <a href="qstandarditemmodel.html#rowCount">rowCount</a>(), the data in the
unwanted rows is discarded.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#rowCount">rowCount</a>() and <a href="qstandarditemmodel.html#setColumnCount">setColumnCount</a>().</p>
<h3 class="fn"><a name="setSortRole" />QStandardItemModel.setSortRole (<i>self</i>, int <i>role</i>)</h3><h3 class="fn"><a name="setVerticalHeaderItem" />QStandardItemModel.setVerticalHeaderItem (<i>self</i>, int <i>row</i>, <a href="qstandarditem.html">QStandardItem</a> <i>item</i>)</h3><p>The <i>item</i> argument has it's ownership transferred to Qt.</p><p>Sets the vertical header item for <i>row</i> to <i>item</i>. The
model takes ownership of the item. If necessary, the row count is
increased to fit the item. The previous header item (if there was
one) is deleted.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#verticalHeaderItem">verticalHeaderItem</a>(),
<a href="qstandarditemmodel.html#setVerticalHeaderLabels">setVerticalHeaderLabels</a>(),
and <a href="qstandarditemmodel.html#setHorizontalHeaderItem">setHorizontalHeaderItem</a>().</p>
<h3 class="fn"><a name="setVerticalHeaderLabels" />QStandardItemModel.setVerticalHeaderLabels (<i>self</i>, QStringList <i>labels</i>)</h3><p>Sets the vertical header labels using <i>labels</i>. If
necessary, the row count is increased to the size of
<i>labels</i>.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#setVerticalHeaderItem">setVerticalHeaderItem</a>().</p>
<h3 class="fn"><a name="sort" />QStandardItemModel.sort (<i>self</i>, int <i>column</i>, <a href="qt.html#SortOrder-enum">Qt.SortOrder</a> <i>order</i> = Qt.AscendingOrder)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#sort">QAbstractItemModel.sort</a>().</p>
<h3 class="fn"><a name="sortRole" />int QStandardItemModel.sortRole (<i>self</i>)</h3><h3 class="fn"><a name="supportedDropActions" /><a href="qt-dropactions.html">Qt.DropActions</a> QStandardItemModel.supportedDropActions (<i>self</i>)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#supportedDropActions">QAbstractItemModel.supportedDropActions</a>().</p>
<p><a href="qstandarditemmodel.html">QStandardItemModel</a>
supports both copy and move.</p>
<h3 class="fn"><a name="takeColumn" />list-of-QStandardItem QStandardItemModel.takeColumn (<i>self</i>, int <i>column</i>)</h3><p>The <i>list-of-QStandardItem</i> result</p><p>Removes the given <i>column</i> without deleting the column
items, and returns a list of pointers to the removed items. The
model releases ownership of the items. For items in the column that
have not been set, the corresponding pointers in the list will be
0.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#takeRow">takeRow</a>().</p>
<h3 class="fn"><a name="takeHorizontalHeaderItem" /><a href="qstandarditem.html">QStandardItem</a> QStandardItemModel.takeHorizontalHeaderItem (<i>self</i>, int <i>column</i>)</h3><p>The <i>QStandardItem</i> result</p><p>Removes the horizontal header item at <i>column</i> from the
header without deleting it, and returns a pointer to the item. The
model releases ownership of the item.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#horizontalHeaderItem">horizontalHeaderItem</a>()
and <a href="qstandarditemmodel.html#takeVerticalHeaderItem">takeVerticalHeaderItem</a>().</p>
<h3 class="fn"><a name="takeItem" /><a href="qstandarditem.html">QStandardItem</a> QStandardItemModel.takeItem (<i>self</i>, int <i>row</i>, int <i>column</i> = 0)</h3><p>The <i>QStandardItem</i> result</p><p>Removes the item at (<i>row</i>, <i>column</i>) without deleting
it. The model releases ownership of the item.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#item">item</a>(), <a href="qstandarditemmodel.html#takeRow">takeRow</a>(), and <a href="qstandarditemmodel.html#takeColumn">takeColumn</a>().</p>
<h3 class="fn"><a name="takeRow" />list-of-QStandardItem QStandardItemModel.takeRow (<i>self</i>, int <i>row</i>)</h3><p>The <i>list-of-QStandardItem</i> result</p><p>Removes the given <i>row</i> without deleting the row items, and
returns a list of pointers to the removed items. The model releases
ownership of the items. For items in the row that have not been
set, the corresponding pointers in the list will be 0.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#takeColumn">takeColumn</a>().</p>
<h3 class="fn"><a name="takeVerticalHeaderItem" /><a href="qstandarditem.html">QStandardItem</a> QStandardItemModel.takeVerticalHeaderItem (<i>self</i>, int <i>row</i>)</h3><p>The <i>QStandardItem</i> result</p><p>Removes the vertical header item at <i>row</i> from the header
without deleting it, and returns a pointer to the item. The model
releases ownership of the item.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#verticalHeaderItem">verticalHeaderItem</a>()
and <a href="qstandarditemmodel.html#takeHorizontalHeaderItem">takeHorizontalHeaderItem</a>().</p>
<h3 class="fn"><a name="verticalHeaderItem" /><a href="qstandarditem.html">QStandardItem</a> QStandardItemModel.verticalHeaderItem (<i>self</i>, int <i>row</i>)</h3><p>Returns the vertical header item for row <i>row</i> if one has
been set; otherwise returns 0.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qstandarditemmodel.html#setVerticalHeaderItem">setVerticalHeaderItem</a>()
and <a href="qstandarditemmodel.html#horizontalHeaderItem">horizontalHeaderItem</a>().</p>
<hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="itemChanged" />void itemChanged (QStandardItem *)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the data of <i>item</i> has
changed.</p>
<p>This function was introduced in Qt 4.2.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.9.3 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt 4.8.2</td></tr></table></div></address></body></html>
|