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
|
<?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>QTreeWidgetItem 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="../pyqt4ref.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">QTreeWidgetItem Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QTreeWidgetItem class provides an item for use with the <a href="qtreewidget.html">QTreeWidget</a> convenience class. <a href="#details">More...</a></p>
<h3>Methods</h3><ul><li><div class="fn" /><b><a href="qtreewidgetitem.html#QTreeWidgetItem">__init__</a></b> (<i>self</i>, int <i>type</i> = QTreeWidgetItem.Type)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#QTreeWidgetItem-2">__init__</a></b> (<i>self</i>, QStringList <i>strings</i>, int <i>type</i> = QTreeWidgetItem.Type)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#QTreeWidgetItem-3">__init__</a></b> (<i>self</i>, QTreeWidget <i>view</i>, int <i>type</i> = QTreeWidgetItem.Type)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#QTreeWidgetItem-4">__init__</a></b> (<i>self</i>, QTreeWidget <i>view</i>, QStringList <i>strings</i>, int <i>type</i> = QTreeWidgetItem.Type)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#QTreeWidgetItem-5">__init__</a></b> (<i>self</i>, QTreeWidget <i>view</i>, QTreeWidgetItem <i>after</i>, int <i>type</i> = QTreeWidgetItem.Type)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#QTreeWidgetItem-6">__init__</a></b> (<i>self</i>, QTreeWidgetItem <i>parent</i>, int <i>type</i> = QTreeWidgetItem.Type)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#QTreeWidgetItem-7">__init__</a></b> (<i>self</i>, QTreeWidgetItem <i>parent</i>, QStringList <i>strings</i>, int <i>type</i> = QTreeWidgetItem.Type)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#QTreeWidgetItem-8">__init__</a></b> (<i>self</i>, QTreeWidgetItem <i>parent</i>, QTreeWidgetItem <i>after</i>, int <i>type</i> = QTreeWidgetItem.Type)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#QTreeWidgetItem-9">__init__</a></b> (<i>self</i>, QTreeWidgetItem <i>other</i>)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#addChild">addChild</a></b> (<i>self</i>, QTreeWidgetItem <i>child</i>)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#addChildren">addChildren</a></b> (<i>self</i>, QTreeWidgetItem-list <i>children</i>)</li><li><div class="fn" />QColor <b><a href="qtreewidgetitem.html#backgroundColor">backgroundColor</a></b> (<i>self</i>, int <i>column</i>)</li><li><div class="fn" />Qt.CheckState <b><a href="qtreewidgetitem.html#checkState">checkState</a></b> (<i>self</i>, int <i>column</i>)</li><li><div class="fn" />QTreeWidgetItem <b><a href="qtreewidgetitem.html#child">child</a></b> (<i>self</i>, int <i>index</i>)</li><li><div class="fn" />int <b><a href="qtreewidgetitem.html#childCount">childCount</a></b> (<i>self</i>)</li><li><div class="fn" />QTreeWidgetItem <b><a href="qtreewidgetitem.html#clone">clone</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qtreewidgetitem.html#columnCount">columnCount</a></b> (<i>self</i>)</li><li><div class="fn" />QVariant <b><a href="qtreewidgetitem.html#data">data</a></b> (<i>self</i>, int <i>column</i>, int <i>role</i>)</li><li><div class="fn" />Qt.ItemFlags <b><a href="qtreewidgetitem.html#flags">flags</a></b> (<i>self</i>)</li><li><div class="fn" />QFont <b><a href="qtreewidgetitem.html#font">font</a></b> (<i>self</i>, int <i>column</i>)</li><li><div class="fn" />QIcon <b><a href="qtreewidgetitem.html#icon">icon</a></b> (<i>self</i>, int <i>column</i>)</li><li><div class="fn" />int <b><a href="qtreewidgetitem.html#indexOfChild">indexOfChild</a></b> (<i>self</i>, QTreeWidgetItem <i>achild</i>)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#insertChild">insertChild</a></b> (<i>self</i>, int <i>index</i>, QTreeWidgetItem <i>child</i>)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#insertChildren">insertChildren</a></b> (<i>self</i>, int <i>index</i>, QTreeWidgetItem-list <i>children</i>)</li><li><div class="fn" />QTreeWidgetItem <b><a href="qtreewidgetitem.html#parent">parent</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#read">read</a></b> (<i>self</i>, QDataStream <i>in</i>)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#setBackgroundColor">setBackgroundColor</a></b> (<i>self</i>, int <i>column</i>, QColor <i>color</i>)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#setCheckState">setCheckState</a></b> (<i>self</i>, int <i>column</i>, Qt.CheckState <i>state</i>)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#setData">setData</a></b> (<i>self</i>, int <i>column</i>, int <i>role</i>, QVariant <i>value</i>)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#setFlags">setFlags</a></b> (<i>self</i>, Qt.ItemFlags <i>aflags</i>)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#setFont">setFont</a></b> (<i>self</i>, int <i>column</i>, QFont <i>afont</i>)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#setIcon">setIcon</a></b> (<i>self</i>, int <i>column</i>, QIcon <i>aicon</i>)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#setSizeHint">setSizeHint</a></b> (<i>self</i>, int <i>column</i>, QSize <i>size</i>)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#setStatusTip">setStatusTip</a></b> (<i>self</i>, int <i>column</i>, QString <i>astatusTip</i>)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#setText">setText</a></b> (<i>self</i>, int <i>column</i>, QString <i>atext</i>)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#setTextAlignment">setTextAlignment</a></b> (<i>self</i>, int <i>column</i>, int <i>alignment</i>)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#setTextColor">setTextColor</a></b> (<i>self</i>, int <i>column</i>, QColor <i>color</i>)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#setToolTip">setToolTip</a></b> (<i>self</i>, int <i>column</i>, QString <i>atoolTip</i>)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#setWhatsThis">setWhatsThis</a></b> (<i>self</i>, int <i>column</i>, QString <i>awhatsThis</i>)</li><li><div class="fn" />QSize <b><a href="qtreewidgetitem.html#sizeHint">sizeHint</a></b> (<i>self</i>, int <i>column</i>)</li><li><div class="fn" />QString <b><a href="qtreewidgetitem.html#statusTip">statusTip</a></b> (<i>self</i>, int <i>column</i>)</li><li><div class="fn" />QTreeWidgetItem <b><a href="qtreewidgetitem.html#takeChild">takeChild</a></b> (<i>self</i>, int <i>index</i>)</li><li><div class="fn" />QTreeWidgetItem-list <b><a href="qtreewidgetitem.html#takeChildren">takeChildren</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qtreewidgetitem.html#text">text</a></b> (<i>self</i>, int <i>column</i>)</li><li><div class="fn" />int <b><a href="qtreewidgetitem.html#textAlignment">textAlignment</a></b> (<i>self</i>, int <i>column</i>)</li><li><div class="fn" />QColor <b><a href="qtreewidgetitem.html#textColor">textColor</a></b> (<i>self</i>, int <i>column</i>)</li><li><div class="fn" />QString <b><a href="qtreewidgetitem.html#toolTip">toolTip</a></b> (<i>self</i>, int <i>column</i>)</li><li><div class="fn" />QTreeWidget <b><a href="qtreewidgetitem.html#treeWidget">treeWidget</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qtreewidgetitem.html#type">type</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qtreewidgetitem.html#whatsThis">whatsThis</a></b> (<i>self</i>, int <i>column</i>)</li><li><div class="fn" /><b><a href="qtreewidgetitem.html#write">write</a></b> (<i>self</i>, QDataStream <i>out</i>)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />bool <b><a href="qtreewidgetitem.html#__lt__">__lt__</a></b> (<i>self</i>, QTreeWidgetItem <i>other</i>)</li></ul><h3>Static Members</h3><ul><li><div class="fn" />int <b><a href="qtreewidgetitem.html#Type-var">Type</a></b></li><li><div class="fn" />int <b><a href="qtreewidgetitem.html#UserType-var">UserType</a></b></li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QTreeWidgetItem class provides an item for use with the <a href="qtreewidget.html">QTreeWidget</a> convenience class.</p>
<p>Tree widget items are used to hold rows of information for tree widgets. Rows usually contain several columns of data, each of which can contain a text label and an icon.</p>
<p>The QTreeWidgetItem class is a convenience class that replaces the QListViewItem class in Qt 3. It provides an item for use with the <a href="qtreewidget.html">QTreeWidget</a> class.</p>
<p>Items are usually constructed with a parent that is either a <a href="qtreewidget.html">QTreeWidget</a> (for top-level items) or a QTreeWidgetItem (for items on lower levels of the tree). For example, the following code constructs a top-level item to represent cities of the world, and adds a entry for Oslo as a child item:</p>
<pre>
QTreeWidgetItem *cities = new QTreeWidgetItem(treeWidget);
cities->setText(0, tr("Cities"));
QTreeWidgetItem *osloItem = new QTreeWidgetItem(cities);
osloItem->setText(0, tr("Oslo"));
osloItem->setText(1, tr("Yes"));
</pre>
<p>Items can be added in a particular order by specifying the item they follow when they are constructed:</p>
<pre>
QTreeWidgetItem *planets = new QTreeWidgetItem(treeWidget, cities);
planets->setText(0, tr("Planets"));
</pre>
<p>Each column in an item can have its own background color which is set with the <a href="qtreewidgetitem.html#setBackgroundColor">setBackgroundColor</a>() function. The current background color can be found with <a href="qtreewidgetitem.html#backgroundColor">backgroundColor</a>(). The text label for each column can be rendered with its own font and text color. These are specified with the <a href="qtreewidgetitem.html#setFont">setFont</a>() and <a href="qtreewidgetitem.html#setTextColor">setTextColor</a>() functions, and read with <a href="qtreewidgetitem.html#font">font</a>() and <a href="qtreewidgetitem.html#textColor">textColor</a>().</p>
<p>The main difference between top-level items and those in lower levels of the tree is that a top-level item has no <a href="qtreewidgetitem.html#parent">parent</a>(). This information can be used to tell the difference between items, and is useful to know when inserting and removing items from the tree. Children of an item can be removed with <a href="qtreewidgetitem.html#takeChild">takeChild</a>() and inserted at a given index in the list of children with the <a href="qtreewidgetitem.html#insertChild">insertChild</a>() function.</p>
<p>By default, items are enabled, selectable, checkable, and can be the source of a drag and drop operation. Each item's flags can be changed by calling <a href="qtreewidgetitem.html#setFlags">setFlags</a>() with the appropriate value (see <a href="qt.html#ItemFlag-enum">Qt.ItemFlags</a>). Checkable items can be checked and unchecked with the setChecked() function. The corresponding checked() function indicates whether the item is currently checked.</p>
<p>See also <a href="qtreewidget.html">QTreeWidget</a>, <a href="model-view-programming.html">Model/View Programming</a>, <a href="qlistwidgetitem.html">QListWidgetItem</a>, and <a href="qtablewidgetitem.html">QTableWidgetItem</a>.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QTreeWidgetItem" />QTreeWidgetItem.__init__ (<i>self</i>, int <i>type</i> = QTreeWidgetItem.Type)</h3><p>Constructs a tree widget item of the specified <i>type</i>. The item must be inserted into a tree widget.</p>
<p>See also <a href="qtreewidgetitem.html#type">type</a>().</p>
<h3 class="fn"><a name="QTreeWidgetItem-2" />QTreeWidgetItem.__init__ (<i>self</i>, <a href="qstringlist.html">QStringList</a> <i>strings</i>, int <i>type</i> = QTreeWidgetItem.Type)</h3><p>Constructs a tree widget item of the specified <i>type</i>. The item must be inserted into a tree widget. The given list of <i>strings</i> will be set as the item text for each column in the item.</p>
<p>See also <a href="qtreewidgetitem.html#type">type</a>().</p>
<h3 class="fn"><a name="QTreeWidgetItem-3" />QTreeWidgetItem.__init__ (<i>self</i>, <a href="qtreewidget.html">QTreeWidget</a> <i>view</i>, int <i>type</i> = QTreeWidgetItem.Type)</h3><p>The <i>view</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a tree widget item of the specified <i>type</i> and appends it to the items in the given <i>parent</i>.</p>
<p>See also <a href="qtreewidgetitem.html#type">type</a>().</p>
<h3 class="fn"><a name="QTreeWidgetItem-4" />QTreeWidgetItem.__init__ (<i>self</i>, <a href="qtreewidget.html">QTreeWidget</a> <i>view</i>, <a href="qstringlist.html">QStringList</a> <i>strings</i>, int <i>type</i> = QTreeWidgetItem.Type)</h3><p>The <i>view</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a tree widget item of the specified <i>type</i> and appends it to the items in the given <i>parent</i>. The given list of <i>strings</i> will be set as the item text for each column in the item.</p>
<p>See also <a href="qtreewidgetitem.html#type">type</a>().</p>
<h3 class="fn"><a name="QTreeWidgetItem-5" />QTreeWidgetItem.__init__ (<i>self</i>, <a href="qtreewidget.html">QTreeWidget</a> <i>view</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a> <i>after</i>, int <i>type</i> = QTreeWidgetItem.Type)</h3><p>The <i>view</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a tree widget item of the specified <i>type</i> and inserts it into the given <i>parent</i> after the <i>preceding</i> item.</p>
<p>See also <a href="qtreewidgetitem.html#type">type</a>().</p>
<h3 class="fn"><a name="QTreeWidgetItem-6" />QTreeWidgetItem.__init__ (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a> <i>parent</i>, int <i>type</i> = QTreeWidgetItem.Type)</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 tree widget item and append it to the given <i>parent</i>.</p>
<p>See also <a href="qtreewidgetitem.html#type">type</a>().</p>
<h3 class="fn"><a name="QTreeWidgetItem-7" />QTreeWidgetItem.__init__ (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a> <i>parent</i>, <a href="qstringlist.html">QStringList</a> <i>strings</i>, int <i>type</i> = QTreeWidgetItem.Type)</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 tree widget item and append it to the given <i>parent</i>. The given list of <i>strings</i> will be set as the item text for each column in the item.</p>
<p>See also <a href="qtreewidgetitem.html#type">type</a>().</p>
<h3 class="fn"><a name="QTreeWidgetItem-8" />QTreeWidgetItem.__init__ (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a> <i>parent</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a> <i>after</i>, int <i>type</i> = QTreeWidgetItem.Type)</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 tree widget item of the specified <i>type</i> that is inserted into the <i>parent</i> after the <i>preceding</i> child item.</p>
<p>See also <a href="qtreewidgetitem.html#type">type</a>().</p>
<h3 class="fn"><a name="QTreeWidgetItem-9" />QTreeWidgetItem.__init__ (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a> <i>other</i>)</h3><p>Constructs a copy of <i>other</i>. Note that <a href="qtreewidgetitem.html#type">type</a>() and <a href="qtreewidgetitem.html#treeWidget">treeWidget</a>() are not copied.</p>
<p>This function is useful when reimplementing <a href="qtreewidgetitem.html#clone">clone</a>().</p>
<p>This function was introduced in Qt 4.1.</p>
<p>See also <a href="qtreewidgetitem.html#data">data</a>() and <a href="qtreewidgetitem.html#flags">flags</a>().</p>
<h3 class="fn"><a name="addChild" />QTreeWidgetItem.addChild (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a> <i>child</i>)</h3><p>The <i>child</i> argument has it's ownership transferred to Qt.</p><p>Appends the <i>child</i> item to the list of children.</p>
<p>See also <a href="qtreewidgetitem.html#insertChild">insertChild</a>() and <a href="qtreewidgetitem.html#takeChild">takeChild</a>().</p>
<h3 class="fn"><a name="addChildren" />QTreeWidgetItem.addChildren (<i>self</i>, QTreeWidgetItem-list <i>children</i>)</h3><p>The <i>children</i> argument has it's ownership transferred to Qt.</p><p>Appends the given list of <i>children</i> to the item.</p>
<p>This function was introduced in Qt 4.1.</p>
<p>See also <a href="qtreewidgetitem.html#insertChildren">insertChildren</a>() and <a href="qtreewidgetitem.html#takeChildren">takeChildren</a>().</p>
<h3 class="fn"><a name="backgroundColor" /><a href="qcolor.html">QColor</a> QTreeWidgetItem.backgroundColor (<i>self</i>, int <i>column</i>)</h3><p>Returns the color used to render the background of the specified <i>column</i>.</p>
<p>See also <a href="qtreewidgetitem.html#textColor">textColor</a>() and <a href="qtreewidgetitem.html#setBackgroundColor">setBackgroundColor</a>().</p>
<h3 class="fn"><a name="checkState" /><a href="qt.html#CheckState-enum">Qt.CheckState</a> QTreeWidgetItem.checkState (<i>self</i>, int <i>column</i>)</h3><p>Returns the check state of the label in the given <i>column</i>.</p>
<p>See also <a href="qtreewidgetitem.html#setCheckState">setCheckState</a>() and <a href="qt.html#CheckState-enum">Qt.CheckState</a>.</p>
<h3 class="fn"><a name="child" /><a href="qtreewidgetitem.html">QTreeWidgetItem</a> QTreeWidgetItem.child (<i>self</i>, int <i>index</i>)</h3><p>Returns the item at the given <i>index</i> in the list of the item's children.</p>
<p>See also <a href="qtreewidgetitem.html#parent">parent</a>().</p>
<h3 class="fn"><a name="childCount" />int QTreeWidgetItem.childCount (<i>self</i>)</h3><p>Returns the number of child items.</p>
<h3 class="fn"><a name="clone" /><a href="qtreewidgetitem.html">QTreeWidgetItem</a> QTreeWidgetItem.clone (<i>self</i>)</h3><p>Creates a deep copy of the item and of its children.</p>
<h3 class="fn"><a name="columnCount" />int QTreeWidgetItem.columnCount (<i>self</i>)</h3><p>Returns the number of columns in the item.</p>
<h3 class="fn"><a name="data" /><a href="qvariant.html">QVariant</a> QTreeWidgetItem.data (<i>self</i>, int <i>column</i>, int <i>role</i>)</h3><p>Returns the value for the item's <i>column</i> and <i>role</i>.</p>
<p>See also <a href="qtreewidgetitem.html#setData">setData</a>().</p>
<h3 class="fn"><a name="flags" /><a href="qt-itemflags.html">Qt.ItemFlags</a> QTreeWidgetItem.flags (<i>self</i>)</h3><p>Returns the flags used to describe the item. These determine whether the item can be checked, edited, and selected.</p>
<p>The default value for flags is <a href="qt.html#ItemFlag-enum">Qt.ItemIsSelectable</a> | <a href="qt.html#ItemFlag-enum">Qt.ItemIsUserCheckable</a> | <a href="qt.html#ItemFlag-enum">Qt.ItemIsEnabled</a> | <a href="qt.html#ItemFlag-enum">Qt.ItemIsDragEnabled</a>. If the item was constructed with a parent, flags will in addition contain <a href="qt.html#ItemFlag-enum">Qt.ItemIsDropEnabled</a>.</p>
<p>See also <a href="qtreewidgetitem.html#setFlags">setFlags</a>().</p>
<h3 class="fn"><a name="font" /><a href="qfont.html">QFont</a> QTreeWidgetItem.font (<i>self</i>, int <i>column</i>)</h3><p>Returns the font used to render the text in the specified <i>column</i>.</p>
<p>See also <a href="qtreewidgetitem.html#setFont">setFont</a>().</p>
<h3 class="fn"><a name="icon" /><a href="qicon.html">QIcon</a> QTreeWidgetItem.icon (<i>self</i>, int <i>column</i>)</h3><p>Returns the icon that is displayed in the specified <i>column</i>.</p>
<p>See also <a href="qtreewidgetitem.html#setIcon">setIcon</a>() and <a href="qabstractitemview.html#iconSize-prop">iconSize</a>.</p>
<h3 class="fn"><a name="indexOfChild" />int QTreeWidgetItem.indexOfChild (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a> <i>achild</i>)</h3><p>Returns the index of the given <i>child</i> in the item's list of children.</p>
<h3 class="fn"><a name="insertChild" />QTreeWidgetItem.insertChild (<i>self</i>, int <i>index</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a> <i>child</i>)</h3><p>The <i>child</i> argument has it's ownership transferred to Qt.</p><p>Inserts the <i>child</i> item at <i>index</i> in the list of children.</p>
<h3 class="fn"><a name="insertChildren" />QTreeWidgetItem.insertChildren (<i>self</i>, int <i>index</i>, QTreeWidgetItem-list <i>children</i>)</h3><p>The <i>children</i> argument has it's ownership transferred to Qt.</p><p>Inserts the given list of <i>children</i> into the list of the item children at <i>index</i> .</p>
<p>This function was introduced in Qt 4.1.</p>
<h3 class="fn"><a name="parent" /><a href="qtreewidgetitem.html">QTreeWidgetItem</a> QTreeWidgetItem.parent (<i>self</i>)</h3><p>Returns the item's parent.</p>
<p>See also <a href="qtreewidgetitem.html#child">child</a>().</p>
<h3 class="fn"><a name="read" />QTreeWidgetItem.read (<i>self</i>, <a href="qdatastream.html">QDataStream</a> <i>in</i>)</h3><p>Reads the item from stream <i>in</i>. This only reads data into a single item.</p>
<p>See also <a href="qtreewidgetitem.html#write">write</a>().</p>
<h3 class="fn"><a name="setBackgroundColor" />QTreeWidgetItem.setBackgroundColor (<i>self</i>, int <i>column</i>, <a href="qcolor.html">QColor</a> <i>color</i>)</h3><p>Sets the background color of the label in the given <i>column</i> to the specified <i>color</i>.</p>
<p>See also <a href="qtreewidgetitem.html#backgroundColor">backgroundColor</a>() and <a href="qtreewidgetitem.html#setTextColor">setTextColor</a>().</p>
<h3 class="fn"><a name="setCheckState" />QTreeWidgetItem.setCheckState (<i>self</i>, int <i>column</i>, <a href="qt.html#CheckState-enum">Qt.CheckState</a> <i>state</i>)</h3><p>Sets the item in the given <i>column</i> check state to be <i>state</i>.</p>
<p>See also <a href="qtreewidgetitem.html#checkState">checkState</a>().</p>
<h3 class="fn"><a name="setData" />QTreeWidgetItem.setData (<i>self</i>, int <i>column</i>, int <i>role</i>, <a href="qvariant.html">QVariant</a> <i>value</i>)</h3><p>Sets the value for the item's <i>column</i> and <i>role</i> to the given <i>value</i>.</p>
<p>The <i>role</i> describes the type of data specified by <i>value</i>, and is defined by the <a href="qt.html#ItemDataRole-enum">Qt.ItemDataRole</a> enum.</p>
<p>See also <a href="qtreewidgetitem.html#data">data</a>().</p>
<h3 class="fn"><a name="setFlags" />QTreeWidgetItem.setFlags (<i>self</i>, <a href="qt-itemflags.html">Qt.ItemFlags</a> <i>aflags</i>)</h3><p>Sets the flags for the item to the given <i>flags</i>. These determine whether the item can be selected or modified.</p>
<p>See also <a href="qtreewidgetitem.html#flags">flags</a>().</p>
<h3 class="fn"><a name="setFont" />QTreeWidgetItem.setFont (<i>self</i>, int <i>column</i>, <a href="qfont.html">QFont</a> <i>afont</i>)</h3><p>Sets the font used to display the text in the given <i>column</i> to the given <i>font</i>.</p>
<p>See also <a href="qtreewidgetitem.html#font">font</a>(), <a href="qtreewidgetitem.html#setText">setText</a>(), and <a href="qtreewidgetitem.html#setTextColor">setTextColor</a>().</p>
<h3 class="fn"><a name="setIcon" />QTreeWidgetItem.setIcon (<i>self</i>, int <i>column</i>, <a href="qicon.html">QIcon</a> <i>aicon</i>)</h3><p>Sets the icon to be displayed in the given <i>column</i> to <i>icon</i>.</p>
<p>See also <a href="qtreewidgetitem.html#icon">icon</a>(), <a href="qtreewidgetitem.html#setText">setText</a>(), and <a href="qabstractitemview.html#iconSize-prop">iconSize</a>.</p>
<h3 class="fn"><a name="setSizeHint" />QTreeWidgetItem.setSizeHint (<i>self</i>, int <i>column</i>, <a href="qsize.html">QSize</a> <i>size</i>)</h3><p>Sets the size hint for the tree item in the given <i>column</i> to be <i>size</i>. If no size hint is set, the item delegate will compute the size hint based on the item data.</p>
<p>This function was introduced in Qt 4.1.</p>
<p>See also <a href="qtreewidgetitem.html#sizeHint">sizeHint</a>().</p>
<h3 class="fn"><a name="setStatusTip" />QTreeWidgetItem.setStatusTip (<i>self</i>, int <i>column</i>, <a href="qstring.html">QString</a> <i>astatusTip</i>)</h3><p>Sets the status tip for the given <i>column</i> to the given <i>statusTip</i>. <a href="qtreewidget.html">QTreeWidget</a> mouse tracking needs to be enabled for this feature to work.</p>
<p>See also <a href="qtreewidgetitem.html#statusTip">statusTip</a>(), <a href="qtreewidgetitem.html#setToolTip">setToolTip</a>(), and <a href="qtreewidgetitem.html#setWhatsThis">setWhatsThis</a>().</p>
<h3 class="fn"><a name="setText" />QTreeWidgetItem.setText (<i>self</i>, int <i>column</i>, <a href="qstring.html">QString</a> <i>atext</i>)</h3><p>Sets the text to be displayed in the given <i>column</i> to the given <i>text</i>.</p>
<p>See also <a href="qtreewidgetitem.html#text">text</a>(), <a href="qtreewidgetitem.html#setFont">setFont</a>(), and <a href="qtreewidgetitem.html#setTextColor">setTextColor</a>().</p>
<h3 class="fn"><a name="setTextAlignment" />QTreeWidgetItem.setTextAlignment (<i>self</i>, int <i>column</i>, int <i>alignment</i>)</h3><p>Sets the text alignment for the label in the given <i>column</i> to the <i>alignment</i> specified (see <a href="qt.html#AlignmentFlag-enum">Qt.AlignmentFlag</a>).</p>
<p>See also <a href="qtreewidgetitem.html#textAlignment">textAlignment</a>().</p>
<h3 class="fn"><a name="setTextColor" />QTreeWidgetItem.setTextColor (<i>self</i>, int <i>column</i>, <a href="qcolor.html">QColor</a> <i>color</i>)</h3><p>Sets the color used to display the text in the given <i>column</i> to <i>color</i>.</p>
<p>See also <a href="qtreewidgetitem.html#textColor">textColor</a>(), <a href="qtreewidgetitem.html#setFont">setFont</a>(), and <a href="qtreewidgetitem.html#setText">setText</a>().</p>
<h3 class="fn"><a name="setToolTip" />QTreeWidgetItem.setToolTip (<i>self</i>, int <i>column</i>, <a href="qstring.html">QString</a> <i>atoolTip</i>)</h3><p>Sets the tooltip for the given <i>column</i> to <i>toolTip</i>.</p>
<p>See also <a href="qtreewidgetitem.html#toolTip">toolTip</a>(), <a href="qtreewidgetitem.html#setStatusTip">setStatusTip</a>(), and <a href="qtreewidgetitem.html#setWhatsThis">setWhatsThis</a>().</p>
<h3 class="fn"><a name="setWhatsThis" />QTreeWidgetItem.setWhatsThis (<i>self</i>, int <i>column</i>, <a href="qstring.html">QString</a> <i>awhatsThis</i>)</h3><p>Sets the "What's This?" help for the given <i>column</i> to <i>whatsThis</i>.</p>
<p>See also <a href="qtreewidgetitem.html#whatsThis">whatsThis</a>(), <a href="qtreewidgetitem.html#setStatusTip">setStatusTip</a>(), and <a href="qtreewidgetitem.html#setToolTip">setToolTip</a>().</p>
<h3 class="fn"><a name="sizeHint" /><a href="qsize.html">QSize</a> QTreeWidgetItem.sizeHint (<i>self</i>, int <i>column</i>)</h3><p>Returns the size hint set for the tree item in the given <i>column</i> (see <a href="qsize.html">QSize</a>).</p>
<p>This function was introduced in Qt 4.1.</p>
<p>See also <a href="qtreewidgetitem.html#setSizeHint">setSizeHint</a>().</p>
<h3 class="fn"><a name="statusTip" /><a href="qstring.html">QString</a> QTreeWidgetItem.statusTip (<i>self</i>, int <i>column</i>)</h3><p>Returns the status tip for the contents of the given <i>column</i>.</p>
<p>See also <a href="qtreewidgetitem.html#setStatusTip">setStatusTip</a>().</p>
<h3 class="fn"><a name="takeChild" /><a href="qtreewidgetitem.html">QTreeWidgetItem</a> QTreeWidgetItem.takeChild (<i>self</i>, int <i>index</i>)</h3><p>The <i>QTreeWidgetItem</i> result</p><p>Removes the item at <i>index</i> and returns it, otherwise return 0.</p>
<h3 class="fn"><a name="takeChildren" />QTreeWidgetItem-list QTreeWidgetItem.takeChildren (<i>self</i>)</h3><p>The <i>QList<QTreeWidgetItem *></i> result</p><p>Removes the list of children and returns it, otherwise return an empty list.</p>
<p>This function was introduced in Qt 4.1.</p>
<h3 class="fn"><a name="text" /><a href="qstring.html">QString</a> QTreeWidgetItem.text (<i>self</i>, int <i>column</i>)</h3><p>Returns the text in the specified <i>column</i>.</p>
<p>See also <a href="qtreewidgetitem.html#setText">setText</a>().</p>
<h3 class="fn"><a name="textAlignment" />int QTreeWidgetItem.textAlignment (<i>self</i>, int <i>column</i>)</h3><p>Returns the text alignment for the label in the given <i>column</i> (see <a href="qt.html#AlignmentFlag-enum">Qt.AlignmentFlag</a>).</p>
<p>See also <a href="qtreewidgetitem.html#setTextAlignment">setTextAlignment</a>().</p>
<h3 class="fn"><a name="textColor" /><a href="qcolor.html">QColor</a> QTreeWidgetItem.textColor (<i>self</i>, int <i>column</i>)</h3><p>Returns the color used to render the text in the specified <i>column</i>.</p>
<p>See also <a href="qtreewidgetitem.html#backgroundColor">backgroundColor</a>() and <a href="qtreewidgetitem.html#setTextColor">setTextColor</a>().</p>
<h3 class="fn"><a name="toolTip" /><a href="qstring.html">QString</a> QTreeWidgetItem.toolTip (<i>self</i>, int <i>column</i>)</h3><p>Returns the tool tip for the given <i>column</i>.</p>
<p>See also <a href="qtreewidgetitem.html#setToolTip">setToolTip</a>().</p>
<h3 class="fn"><a name="treeWidget" /><a href="qtreewidget.html">QTreeWidget</a> QTreeWidgetItem.treeWidget (<i>self</i>)</h3><p>Returns the tree widget that contains the item.</p>
<h3 class="fn"><a name="type" />int QTreeWidgetItem.type (<i>self</i>)</h3><p>Returns the type passed to the <a href="qtreewidgetitem.html">QTreeWidgetItem</a> constructor.</p>
<h3 class="fn"><a name="whatsThis" /><a href="qstring.html">QString</a> QTreeWidgetItem.whatsThis (<i>self</i>, int <i>column</i>)</h3><p>Returns the "What's This?" help for the contents of the given <i>column</i>.</p>
<p>See also <a href="qtreewidgetitem.html#setWhatsThis">setWhatsThis</a>().</p>
<h3 class="fn"><a name="write" />QTreeWidgetItem.write (<i>self</i>, <a href="qdatastream.html">QDataStream</a> <i>out</i>)</h3><p>Writes the item to stream <i>out</i>. This only writes data from one single item.</p>
<p>See also <a href="qtreewidgetitem.html#read">read</a>().</p>
<h3 class="fn"><a name="__lt__" />bool QTreeWidgetItem.__lt__ (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a> <i>other</i>)</h3><hr /><h2>Member Documentation</h2><h3 class="fn"><a name="Type-var" />int Type</h3><p>This member should be treated as a constant.</p><p>The default type for tree widget items.</p>
<p>See also <a href="qtreewidgetitem.html#UserType-var">UserType</a> and <a href="qtreewidgetitem.html#type">type</a>().</p>
<h3 class="fn"><a name="UserType-var" />int UserType</h3><p>This member should be treated as a constant.</p><p>The minimum value for custom types. Values below UserType are reserved by Qt.</p>
<p>See also <a href="qtreewidgetitem.html#Type-var">Type</a> and <a href="qtreewidgetitem.html#type">type</a>().</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td width="25%">PyQt 4.0.1 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.trolltech.com">Trolltech AS</a> 2006</td><td align="right" width="25%">Qt 4.1.4</td></tr></table></div></address></body></html>
|