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

« back to all changes in this revision

Viewing changes to doc/html/qtablewidget.html

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

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1"?>
 
2
<!DOCTYPE html
 
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/gui/itemviews/qtablewidget.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: QTableWidget Class Reference</title>
 
8
    <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
 
9
a:link { color: #004faf; text-decoration: none }
 
10
a:visited { color: #672967; text-decoration: none }
 
11
td.postheader { font-family: sans-serif }
 
12
tr.address { font-family: sans-serif }
 
13
body { background: #ffffff; color: black; }</style>
 
14
</head>
 
15
<body>
 
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 
17
<tr>
 
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
 
19
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="annotated.html"><font color="#004faf">Annotated</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
 
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">QTableWidget Class Reference</h1>
 
21
<p>The QTableWidget class provides an item-based table view with a default model. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;QTableWidget&gt;</pre><p>Part of the <a href="qtgui.html">QtGui</a> module.</p>
 
23
<p>Inherits <a href="qtableview.html">QTableView</a>.</p>
 
24
<ul>
 
25
<li><a href="qtablewidget-members.html">List of all members, including inherited members</a></li>
 
26
</ul>
 
27
<a name="properties"></a>
 
28
<h3>Properties</h3>
 
29
<ul>
 
30
<li><div class="fn"/><b><a href="qtablewidget.html#columnCount-prop">columnCount</a></b> : int</li>
 
31
<li><div class="fn"/><b><a href="qtablewidget.html#rowCount-prop">rowCount</a></b> : int</li>
 
32
<li><div class="fn"/><b><a href="qtablewidget.html#sortingEnabled-prop">sortingEnabled</a></b> : bool</li>
 
33
</ul>
 
34
<ul>
 
35
<li><div class="fn"/>2 properties inherited from <a href="qtableview.html#properties">QTableView</a></li>
 
36
<li><div class="fn"/>10 properties inherited from <a href="qabstractitemview.html#properties">QAbstractItemView</a></li>
 
37
<li><div class="fn"/>2 properties inherited from <a href="qabstractscrollarea.html#properties">QAbstractScrollArea</a></li>
 
38
<li><div class="fn"/>6 properties inherited from <a href="qframe.html#properties">QFrame</a></li>
 
39
<li><div class="fn"/>52 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
 
40
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
 
41
</ul>
 
42
<a name="public-functions"></a>
 
43
<h3>Public Functions</h3>
 
44
<ul>
 
45
<li><div class="fn"/><b><a href="qtablewidget.html#QTableWidget">QTableWidget</a></b> ( QWidget * <i>parent</i> = 0 )</li>
 
46
<li><div class="fn"/><b><a href="qtablewidget.html#QTableWidget-2">QTableWidget</a></b> ( int <i>rows</i>, int <i>columns</i>, QWidget * <i>parent</i> = 0 )</li>
 
47
<li><div class="fn"/><b><a href="qtablewidget.html#dtor.QTableWidget">~QTableWidget</a></b> ()</li>
 
48
<li><div class="fn"/>void <b><a href="qtablewidget.html#closePersistentEditor">closePersistentEditor</a></b> ( QTableWidgetItem * <i>item</i> )</li>
 
49
<li><div class="fn"/>int <b><a href="qtablewidget.html#column">column</a></b> ( const QTableWidgetItem * <i>item</i> ) const</li>
 
50
<li><div class="fn"/>int <b><a href="qtablewidget.html#columnCount-prop">columnCount</a></b> () const</li>
 
51
<li><div class="fn"/>int <b><a href="qtablewidget.html#currentColumn">currentColumn</a></b> () const</li>
 
52
<li><div class="fn"/>QTableWidgetItem * <b><a href="qtablewidget.html#currentItem">currentItem</a></b> () const</li>
 
53
<li><div class="fn"/>int <b><a href="qtablewidget.html#currentRow">currentRow</a></b> () const</li>
 
54
<li><div class="fn"/>void <b><a href="qtablewidget.html#editItem">editItem</a></b> ( QTableWidgetItem * <i>item</i> )</li>
 
55
<li><div class="fn"/>QList&lt;QTableWidgetItem *&gt; <b><a href="qtablewidget.html#findItems">findItems</a></b> ( const QString &amp; <i>text</i>, Qt::MatchFlags <i>flags</i> ) const</li>
 
56
<li><div class="fn"/>QTableWidgetItem * <b><a href="qtablewidget.html#horizontalHeaderItem">horizontalHeaderItem</a></b> ( int <i>column</i> ) const</li>
 
57
<li><div class="fn"/>bool <b><a href="qtablewidget.html#isItemSelected">isItemSelected</a></b> ( const QTableWidgetItem * <i>item</i> ) const</li>
 
58
<li><div class="fn"/>bool <b><a href="qtablewidget.html#sortingEnabled-prop">isSortingEnabled</a></b> () const</li>
 
59
<li><div class="fn"/>QTableWidgetItem * <b><a href="qtablewidget.html#item">item</a></b> ( int <i>row</i>, int <i>column</i> ) const</li>
 
60
<li><div class="fn"/>QTableWidgetItem * <b><a href="qtablewidget.html#itemAt">itemAt</a></b> ( const QPoint &amp; <i>p</i> ) const</li>
 
61
<li><div class="fn"/>QTableWidgetItem * <b><a href="qtablewidget.html#itemAt-2">itemAt</a></b> ( int <i>ax</i>, int <i>ay</i> ) const</li>
 
62
<li><div class="fn"/>const QTableWidgetItem * <b><a href="qtablewidget.html#itemPrototype">itemPrototype</a></b> () const</li>
 
63
<li><div class="fn"/>void <b><a href="qtablewidget.html#openPersistentEditor">openPersistentEditor</a></b> ( QTableWidgetItem * <i>item</i> )</li>
 
64
<li><div class="fn"/>int <b><a href="qtablewidget.html#row">row</a></b> ( const QTableWidgetItem * <i>item</i> ) const</li>
 
65
<li><div class="fn"/>int <b><a href="qtablewidget.html#rowCount-prop">rowCount</a></b> () const</li>
 
66
<li><div class="fn"/>QList&lt;QTableWidgetItem *&gt; <b><a href="qtablewidget.html#selectedItems">selectedItems</a></b> ()</li>
 
67
<li><div class="fn"/>QList&lt;QTableWidgetSelectionRange&gt; <b><a href="qtablewidget.html#selectedRanges">selectedRanges</a></b> () const</li>
 
68
<li><div class="fn"/>void <b><a href="qtablewidget.html#columnCount-prop">setColumnCount</a></b> ( int <i>columns</i> )</li>
 
69
<li><div class="fn"/>void <b><a href="qtablewidget.html#setCurrentItem">setCurrentItem</a></b> ( QTableWidgetItem * <i>item</i> )</li>
 
70
<li><div class="fn"/>void <b><a href="qtablewidget.html#setHorizontalHeaderItem">setHorizontalHeaderItem</a></b> ( int <i>column</i>, QTableWidgetItem * <i>item</i> )</li>
 
71
<li><div class="fn"/>void <b><a href="qtablewidget.html#setHorizontalHeaderLabels">setHorizontalHeaderLabels</a></b> ( const QStringList &amp; <i>labels</i> )</li>
 
72
<li><div class="fn"/>void <b><a href="qtablewidget.html#setItem">setItem</a></b> ( int <i>row</i>, int <i>column</i>, QTableWidgetItem * <i>item</i> )</li>
 
73
<li><div class="fn"/>void <b><a href="qtablewidget.html#setItemPrototype">setItemPrototype</a></b> ( const QTableWidgetItem * <i>item</i> )</li>
 
74
<li><div class="fn"/>void <b><a href="qtablewidget.html#setItemSelected">setItemSelected</a></b> ( const QTableWidgetItem * <i>item</i>, bool <i>select</i> )</li>
 
75
<li><div class="fn"/>void <b><a href="qtablewidget.html#setRangeSelected">setRangeSelected</a></b> ( const QTableWidgetSelectionRange &amp; <i>range</i>, bool <i>select</i> )</li>
 
76
<li><div class="fn"/>void <b><a href="qtablewidget.html#rowCount-prop">setRowCount</a></b> ( int <i>rows</i> )</li>
 
77
<li><div class="fn"/>void <b><a href="qtablewidget.html#sortingEnabled-prop">setSortingEnabled</a></b> ( bool <i>enable</i> )</li>
 
78
<li><div class="fn"/>void <b><a href="qtablewidget.html#setVerticalHeaderItem">setVerticalHeaderItem</a></b> ( int <i>row</i>, QTableWidgetItem * <i>item</i> )</li>
 
79
<li><div class="fn"/>void <b><a href="qtablewidget.html#setVerticalHeaderLabels">setVerticalHeaderLabels</a></b> ( const QStringList &amp; <i>labels</i> )</li>
 
80
<li><div class="fn"/>void <b><a href="qtablewidget.html#sortItems">sortItems</a></b> ( int <i>column</i>, Qt::SortOrder <i>order</i> = Qt::AscendingOrder )</li>
 
81
<li><div class="fn"/>QTableWidgetItem * <b><a href="qtablewidget.html#takeItem">takeItem</a></b> ( int <i>row</i>, int <i>column</i> )</li>
 
82
<li><div class="fn"/>QTableWidgetItem * <b><a href="qtablewidget.html#verticalHeaderItem">verticalHeaderItem</a></b> ( int <i>row</i> ) const</li>
 
83
<li><div class="fn"/>int <b><a href="qtablewidget.html#visualColumn">visualColumn</a></b> ( int <i>logicalColumn</i> ) const</li>
 
84
<li><div class="fn"/>QRect <b><a href="qtablewidget.html#visualItemRect">visualItemRect</a></b> ( const QTableWidgetItem * <i>item</i> ) const</li>
 
85
<li><div class="fn"/>int <b><a href="qtablewidget.html#visualRow">visualRow</a></b> ( int <i>logicalRow</i> ) const</li>
 
86
</ul>
 
87
<ul>
 
88
<li><div class="fn"/>19 public functions inherited from <a href="qtableview.html#public-functions">QTableView</a></li>
 
89
<li><div class="fn"/>37 public functions inherited from <a href="qabstractitemview.html#public-functions">QAbstractItemView</a></li>
 
90
<li><div class="fn"/>8 public functions inherited from <a href="qabstractscrollarea.html#public-functions">QAbstractScrollArea</a></li>
 
91
<li><div class="fn"/>13 public functions inherited from <a href="qframe.html#public-functions">QFrame</a></li>
 
92
<li><div class="fn"/>183 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
 
93
<li><div class="fn"/>28 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
 
94
<li><div class="fn"/>10 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
 
95
</ul>
 
96
<a name="public-slots"></a>
 
97
<h3>Public Slots</h3>
 
98
<ul>
 
99
<li><div class="fn"/>void <b><a href="qtablewidget.html#clear">clear</a></b> ()</li>
 
100
<li><div class="fn"/>void <b><a href="qtablewidget.html#insertColumn">insertColumn</a></b> ( int <i>column</i> )</li>
 
101
<li><div class="fn"/>void <b><a href="qtablewidget.html#insertRow">insertRow</a></b> ( int <i>row</i> )</li>
 
102
<li><div class="fn"/>void <b><a href="qtablewidget.html#removeColumn">removeColumn</a></b> ( int <i>column</i> )</li>
 
103
<li><div class="fn"/>void <b><a href="qtablewidget.html#removeRow">removeRow</a></b> ( int <i>row</i> )</li>
 
104
<li><div class="fn"/>void <b><a href="qtablewidget.html#scrollToItem">scrollToItem</a></b> ( const QTableWidgetItem * <i>item</i>, ScrollHint <i>hint</i> = EnsureVisible )</li>
 
105
</ul>
 
106
<ul>
 
107
<li><div class="fn"/>9 public slots inherited from <a href="qtableview.html#public-slots">QTableView</a></li>
 
108
<li><div class="fn"/>6 public slots inherited from <a href="qabstractitemview.html#public-slots">QAbstractItemView</a></li>
 
109
<li><div class="fn"/>17 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
 
110
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
 
111
</ul>
 
112
<a name="signals"></a>
 
113
<h3>Signals</h3>
 
114
<ul>
 
115
<li><div class="fn"/>void <b><a href="qtablewidget.html#currentItemChanged">currentItemChanged</a></b> ( QTableWidgetItem * <i>current</i>, QTableWidgetItem * <i>previous</i> )</li>
 
116
<li><div class="fn"/>void <b><a href="qtablewidget.html#itemActivated">itemActivated</a></b> ( QTableWidgetItem * <i>item</i> )</li>
 
117
<li><div class="fn"/>void <b><a href="qtablewidget.html#itemChanged">itemChanged</a></b> ( QTableWidgetItem * <i>item</i> )</li>
 
118
<li><div class="fn"/>void <b><a href="qtablewidget.html#itemClicked">itemClicked</a></b> ( QTableWidgetItem * <i>item</i> )</li>
 
119
<li><div class="fn"/>void <b><a href="qtablewidget.html#itemDoubleClicked">itemDoubleClicked</a></b> ( QTableWidgetItem * <i>item</i> )</li>
 
120
<li><div class="fn"/>void <b><a href="qtablewidget.html#itemEntered">itemEntered</a></b> ( QTableWidgetItem * <i>item</i> )</li>
 
121
<li><div class="fn"/>void <b><a href="qtablewidget.html#itemPressed">itemPressed</a></b> ( QTableWidgetItem * <i>item</i> )</li>
 
122
<li><div class="fn"/>void <b><a href="qtablewidget.html#itemSelectionChanged">itemSelectionChanged</a></b> ()</li>
 
123
</ul>
 
124
<ul>
 
125
<li><div class="fn"/>6 signals inherited from <a href="qabstractitemview.html#signals">QAbstractItemView</a></li>
 
126
<li><div class="fn"/>1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
 
127
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
 
128
</ul>
 
129
<a name="protected-functions"></a>
 
130
<h3>Protected Functions</h3>
 
131
<ul>
 
132
<li><div class="fn"/>virtual bool <b><a href="qtablewidget.html#dropMimeData">dropMimeData</a></b> ( int <i>row</i>, int <i>column</i>, const QMimeData * <i>data</i>, Qt::DropAction <i>action</i> )</li>
 
133
<li><div class="fn"/>QModelIndex <b><a href="qtablewidget.html#indexFromItem">indexFromItem</a></b> ( QTableWidgetItem * <i>item</i> ) const</li>
 
134
<li><div class="fn"/>QTableWidgetItem * <b><a href="qtablewidget.html#itemFromIndex">itemFromIndex</a></b> ( const QModelIndex &amp; <i>index</i> ) const</li>
 
135
<li><div class="fn"/>QList&lt;QTableWidgetItem *&gt; <b><a href="qtablewidget.html#items">items</a></b> ( const QMimeData * <i>data</i> ) const</li>
 
136
<li><div class="fn"/>virtual QMimeData * <b><a href="qtablewidget.html#mimeData">mimeData</a></b> ( const QList&lt;QTableWidgetItem *&gt; <i>items</i> ) const</li>
 
137
<li><div class="fn"/>virtual QStringList <b><a href="qtablewidget.html#mimeTypes">mimeTypes</a></b> () const</li>
 
138
<li><div class="fn"/>virtual Qt::DropActions <b><a href="qtablewidget.html#supportedDropActions">supportedDropActions</a></b> () const</li>
 
139
</ul>
 
140
<ul>
 
141
<li><div class="fn"/>7 protected functions inherited from <a href="qtableview.html#protected-functions">QTableView</a></li>
 
142
<li><div class="fn"/>35 protected functions inherited from <a href="qabstractitemview.html#protected-functions">QAbstractItemView</a></li>
 
143
<li><div class="fn"/>17 protected functions inherited from <a href="qabstractscrollarea.html#protected-functions">QAbstractScrollArea</a></li>
 
144
<li><div class="fn"/>39 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
 
145
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
 
146
</ul>
 
147
<h3>Additional Inherited Members</h3>
 
148
<ul>
 
149
<li><div class="fn"/>2 static public members inherited from <a href="qframe.html#static-public-members">QFrame</a></li>
 
150
<li><div class="fn"/>4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
 
151
<li><div class="fn"/>4 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
 
152
<li><div class="fn"/>6 protected slots inherited from <a href="qtableview.html#protected-slots">QTableView</a></li>
 
153
<li><div class="fn"/>8 protected slots inherited from <a href="qabstractitemview.html#protected-slots">QAbstractItemView</a></li>
 
154
</ul>
 
155
<a name="details"></a>
 
156
<hr />
 
157
<h2>Detailed Description</h2>
 
158
<p>The QTableWidget class provides an item-based table view with a default model.</p>
 
159
<p>Table widgets provide standard table display facilities for applications. The items in a QTableWidget are provided by <a href="qtablewidgetitem.html">QTableWidgetItem</a>.</p>
 
160
<p>If you want a table that uses your own data model you should use <a href="qtableview.html">QTableView</a> rather than this class.</p>
 
161
<p>Table widgets can be constructed with the required numbers of rows and columns:</p>
 
162
<pre>&nbsp;       tableWidget = new QTableWidget(12, 3, this);</pre>
 
163
<p>Alternatively, tables can be constructed without a given size and resized later:</p>
 
164
<pre>&nbsp;       tableWidget = new QTableWidget(this);
 
165
        tableWidget-&gt;setRowCount(10);
 
166
        tableWidget-&gt;setColumnCount(5);</pre>
 
167
<p>Items are created ouside the table (with no parent widget) and inserted into the table with <a href="qtablewidget.html#setItem">setItem</a>():</p>
 
168
<pre>&nbsp;       QTableWidgetItem *newItem = new QTableWidgetItem(tr(&quot;%1&quot;).arg(
 
169
            (row+1)*(column+1)));
 
170
        tableWidget-&gt;setItem(row, column, newItem);</pre>
 
171
<p>Tables can be given both horizontal and vertical headers. The simplest way to create the headers is to supply a list of strings to the <a href="qtablewidget.html#setHorizontalHeaderLabels">setHorizontalHeaderLabels</a>() and <a href="qtablewidget.html#setVerticalHeaderLabels">setVerticalHeaderLabels</a>() functions. These will provide simple textual headers for the table's columns and rows. More sophisticated headers can be created from existing table items that are usually constructed outside the table. For example, we can construct a table item with an icon and aligned text, and use it as the header for a particular column:</p>
 
172
<pre>&nbsp;       QTableWidgetItem *cubesHeaderItem = new QTableWidgetItem(tr(&quot;Cubes&quot;));
 
173
        cubesHeaderItem-&gt;setIcon(QIcon(QPixmap(&quot;:/Images/cubed.png&quot;)));
 
174
        cubesHeaderItem-&gt;setTextAlignment(Qt::AlignVCenter);</pre>
 
175
<p>The number of rows in the table can be found with <a href="qtablewidget.html#rowCount-prop">rowCount</a>(), and the number of columns with <a href="qtablewidget.html#columnCount-prop">columnCount</a>(). The table can be cleared with the <a href="qtablewidget.html#clear">clear</a>() function.</p>
 
176
<p>See also <a href="qtablewidgetitem.html">QTableWidgetItem</a> and <a href="model-view-programming.html">Model/View Programming</a>.</p>
 
177
<hr />
 
178
<h2>Property Documentation</h2>
 
179
<h3 class="fn"><a name="columnCount-prop"></a>columnCount : int</h3>
 
180
<p>This property holds the number of columns in the table.</p>
 
181
<p>Access functions:</p>
 
182
<ul>
 
183
<li><div class="fn"/><b>int columnCount () const</b></li>
 
184
<li><div class="fn"/><b>void setColumnCount ( int <i>columns</i> )</b></li>
 
185
</ul>
 
186
<h3 class="fn"><a name="rowCount-prop"></a>rowCount : int</h3>
 
187
<p>This property holds the number of rows in the table.</p>
 
188
<p>Access functions:</p>
 
189
<ul>
 
190
<li><div class="fn"/><b>int rowCount () const</b></li>
 
191
<li><div class="fn"/><b>void setRowCount ( int <i>rows</i> )</b></li>
 
192
</ul>
 
193
<h3 class="fn"><a name="sortingEnabled-prop"></a>sortingEnabled : bool</h3>
 
194
<p>This property holds whether the items in the table can be sorted by clicking on the horizontal header.</p>
 
195
<p>Access functions:</p>
 
196
<ul>
 
197
<li><div class="fn"/><b>bool isSortingEnabled () const</b></li>
 
198
<li><div class="fn"/><b>void setSortingEnabled ( bool <i>enable</i> )</b></li>
 
199
</ul>
 
200
<hr />
 
201
<h2>Member Function Documentation</h2>
 
202
<h3 class="fn"><a name="QTableWidget"></a>QTableWidget::QTableWidget ( <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0 )</h3>
 
203
<p>Creates a new table view with the given <i>parent</i>.</p>
 
204
<h3 class="fn"><a name="QTableWidget-2"></a>QTableWidget::QTableWidget ( int <i>rows</i>, int <i>columns</i>, <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0 )</h3>
 
205
<p>Creates a new table view with the given <i>rows</i> and <i>columns</i>, and with the given <i>parent</i>.</p>
 
206
<h3 class="fn"><a name="dtor.QTableWidget"></a>QTableWidget::~QTableWidget ()</h3>
 
207
<p>Destroys this <a href="qtablewidget.html">QTableWidget</a>.</p>
 
208
<h3 class="fn"><a name="clear"></a>void QTableWidget::clear ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
209
<p>Removes all items and selections in the view.</p>
 
210
<h3 class="fn"><a name="closePersistentEditor"></a>void QTableWidget::closePersistentEditor ( <a href="qtablewidgetitem.html">QTableWidgetItem</a> * <i>item</i> )</h3>
 
211
<p>Closes the persistent editor for <i>item</i>.</p>
 
212
<p>See also <a href="qtablewidget.html#openPersistentEditor">openPersistentEditor</a>().</p>
 
213
<h3 class="fn"><a name="column"></a>int QTableWidget::column ( const <a href="qtablewidgetitem.html">QTableWidgetItem</a> * <i>item</i> ) const</h3>
 
214
<p>Returns the column for the <i>item</i>.</p>
 
215
<h3 class="fn"><a name="currentColumn"></a>int QTableWidget::currentColumn () const</h3>
 
216
<p>Returns the column of the current item.</p>
 
217
<h3 class="fn"><a name="currentItem"></a><a href="qtablewidgetitem.html">QTableWidgetItem</a> * QTableWidget::currentItem () const</h3>
 
218
<p>Returns the current item.</p>
 
219
<h3 class="fn"><a name="currentItemChanged"></a>void QTableWidget::currentItemChanged ( <a href="qtablewidgetitem.html">QTableWidgetItem</a> * <i>current</i>, <a href="qtablewidgetitem.html">QTableWidgetItem</a> * <i>previous</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
220
<p>This signal is emitted whenever the current item changes. The <i>previous</i> item is the item that previously had the focus, <i>current</i> is the new current item.</p>
 
221
<h3 class="fn"><a name="currentRow"></a>int QTableWidget::currentRow () const</h3>
 
222
<p>Returns the row of the current item.</p>
 
223
<h3 class="fn"><a name="dropMimeData"></a>bool QTableWidget::dropMimeData ( int <i>row</i>, int <i>column</i>, const <a href="qmimedata.html">QMimeData</a> * <i>data</i>, <a href="qt.html#DropAction-enum">Qt::DropAction</a> <i>action</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
224
<p>Handles the <i>data</i> supplied by a drag and drop operation that ended with the given <i>action</i> in the given <i>row</i> and <i>column</i>.</p>
 
225
<p>See also <a href="qtablewidget.html#supportedDropActions">supportedDropActions</a>().</p>
 
226
<h3 class="fn"><a name="editItem"></a>void QTableWidget::editItem ( <a href="qtablewidgetitem.html">QTableWidgetItem</a> * <i>item</i> )</h3>
 
227
<p>Starts editing the <i>item</i> if it is editable.</p>
 
228
<h3 class="fn"><a name="findItems"></a><a href="qlist.html">QList</a>&lt;<a href="qtablewidgetitem.html">QTableWidgetItem</a> *&gt; QTableWidget::findItems ( const <a href="qstring.html">QString</a> &amp; <i>text</i>, <a href="qt.html#MatchFlag-enum">Qt::MatchFlags</a> <i>flags</i> ) const</h3>
 
229
<p>Finds items that matches the <i>text</i> using the given <i>flags</i>.</p>
 
230
<h3 class="fn"><a name="horizontalHeaderItem"></a><a href="qtablewidgetitem.html">QTableWidgetItem</a> * QTableWidget::horizontalHeaderItem ( int <i>column</i> ) const</h3>
 
231
<p>Returns the horizontal header item for column <i>column</i>.</p>
 
232
<h3 class="fn"><a name="indexFromItem"></a><a href="qmodelindex.html">QModelIndex</a> QTableWidget::indexFromItem ( <a href="qtablewidgetitem.html">QTableWidgetItem</a> * <i>item</i> ) const&nbsp;&nbsp;<tt> [protected]</tt></h3>
 
233
<p>Returns the <a href="qmodelindex.html">QModelIndex</a> assocated with the given <i>item</i>.</p>
 
234
<h3 class="fn"><a name="insertColumn"></a>void QTableWidget::insertColumn ( int <i>column</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
235
<p>Inserts an empty column into the table at <i>column</i>.</p>
 
236
<h3 class="fn"><a name="insertRow"></a>void QTableWidget::insertRow ( int <i>row</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
237
<p>Inserts an empty row into the table at <i>row</i>.</p>
 
238
<h3 class="fn"><a name="isItemSelected"></a>bool QTableWidget::isItemSelected ( const <a href="qtablewidgetitem.html">QTableWidgetItem</a> * <i>item</i> ) const</h3>
 
239
<p>Returns true if the <i>item</i> is selected, otherwise returns false.</p>
 
240
<h3 class="fn"><a name="item"></a><a href="qtablewidgetitem.html">QTableWidgetItem</a> * QTableWidget::item ( int <i>row</i>, int <i>column</i> ) const</h3>
 
241
<p>Returns the item for the given <i>row</i> and <i>column</i>.</p>
 
242
<p>See also <a href="qtablewidget.html#setItem">setItem</a>().</p>
 
243
<h3 class="fn"><a name="itemActivated"></a>void QTableWidget::itemActivated ( <a href="qtablewidgetitem.html">QTableWidgetItem</a> * <i>item</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
244
<p>This signal is emitted when the specified <i>item</i> has been activated</p>
 
245
<h3 class="fn"><a name="itemAt"></a><a href="qtablewidgetitem.html">QTableWidgetItem</a> * QTableWidget::itemAt ( const <a href="qpoint.html">QPoint</a> &amp; <i>p</i> ) const</h3>
 
246
<p>Returns a pointer to the item at the coordinates <i>p</i>.</p>
 
247
<h3 class="fn"><a name="itemAt-2"></a><a href="qtablewidgetitem.html">QTableWidgetItem</a> * QTableWidget::itemAt ( int <i>ax</i>, int <i>ay</i> ) const</h3>
 
248
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
249
<p>Returns the item at the position (<i>ax</i>, <i>ay</i>) in the table's coordinate system.</p>
 
250
<h3 class="fn"><a name="itemChanged"></a>void QTableWidget::itemChanged ( <a href="qtablewidgetitem.html">QTableWidgetItem</a> * <i>item</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
251
<p>This signal is emitted whenever the data of <i>item</i> has changed.</p>
 
252
<h3 class="fn"><a name="itemClicked"></a>void QTableWidget::itemClicked ( <a href="qtablewidgetitem.html">QTableWidgetItem</a> * <i>item</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
253
<p>This signal is emitted whenever an item in the table is clicked. The <i>item</i> specified is the item that was clicked.</p>
 
254
<h3 class="fn"><a name="itemDoubleClicked"></a>void QTableWidget::itemDoubleClicked ( <a href="qtablewidgetitem.html">QTableWidgetItem</a> * <i>item</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
255
<p>This signal is emitted whenever an item in the table is double clicked. The <i>item</i> specified is the item that was double clicked.</p>
 
256
<h3 class="fn"><a name="itemEntered"></a>void QTableWidget::itemEntered ( <a href="qtablewidgetitem.html">QTableWidgetItem</a> * <i>item</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
257
<p>This signal is emitted when the mouse cursor enters an item. The <i>item</i> is the item entered.</p>
 
258
<p>This signal is only emitted when <a href="qwidget.html#mouseTracking-prop">mouseTracking</a> is turned on, or when a mouse button is pressed while moving into an item.</p>
 
259
<h3 class="fn"><a name="itemFromIndex"></a><a href="qtablewidgetitem.html">QTableWidgetItem</a> * QTableWidget::itemFromIndex ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> ) const&nbsp;&nbsp;<tt> [protected]</tt></h3>
 
260
<p>Returns a pointer to the <a href="qtablewidgetitem.html">QTableWidgetItem</a> assocated with the given <i>index</i>.</p>
 
261
<h3 class="fn"><a name="itemPressed"></a>void QTableWidget::itemPressed ( <a href="qtablewidgetitem.html">QTableWidgetItem</a> * <i>item</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
262
<p>This signal is emitted whenever an item in the table is pressed. The <i>item</i> specified is the item that was pressed.</p>
 
263
<h3 class="fn"><a name="itemPrototype"></a>const <a href="qtablewidgetitem.html">QTableWidgetItem</a> * QTableWidget::itemPrototype () const</h3>
 
264
<p>Returns the item prototype used by the table.</p>
 
265
<p>Copies of the item prototype are returned by the createItem() function.</p>
 
266
<p>See also <a href="qtablewidget.html#setItemPrototype">setItemPrototype</a>().</p>
 
267
<h3 class="fn"><a name="itemSelectionChanged"></a>void QTableWidget::itemSelectionChanged ()&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
268
<p>This signal is emitted whenever the selection changes.</p>
 
269
<p>See also <a href="qtablewidget.html#selectedItems">selectedItems</a>() and <a href="qtablewidget.html#isItemSelected">isItemSelected</a>().</p>
 
270
<h3 class="fn"><a name="items"></a><a href="qlist.html">QList</a>&lt;<a href="qtablewidgetitem.html">QTableWidgetItem</a> *&gt; QTableWidget::items ( const <a href="qmimedata.html">QMimeData</a> * <i>data</i> ) const&nbsp;&nbsp;<tt> [protected]</tt></h3>
 
271
<p>Returns a list of pointers to the items contained in the <i>data</i> object. If the object was not created by a <a href="qtreewidget.html">QTreeWidget</a> in the same process, the list is empty.</p>
 
272
<h3 class="fn"><a name="mimeData"></a><a href="qmimedata.html">QMimeData</a> * QTableWidget::mimeData ( const <a href="qlist.html">QList</a>&lt;<a href="qtablewidgetitem.html">QTableWidgetItem</a> *&gt; <i>items</i> ) const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
273
<p>Returns an object that contains a serialized description of the specified <i>items</i>. The format used to describe the items is obtained from the <a href="qtablewidget.html#mimeTypes">mimeTypes</a>() function.</p>
 
274
<p>If the list of items is empty, 0 is returned rather than a serialized empty list.</p>
 
275
<h3 class="fn"><a name="mimeTypes"></a><a href="qstringlist.html">QStringList</a> QTableWidget::mimeTypes () const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
276
<p>Returns a list of MIME types that can be used to describe a list of tablewidget items.</p>
 
277
<p>See also <a href="qtablewidget.html#mimeData">mimeData</a>().</p>
 
278
<h3 class="fn"><a name="openPersistentEditor"></a>void QTableWidget::openPersistentEditor ( <a href="qtablewidgetitem.html">QTableWidgetItem</a> * <i>item</i> )</h3>
 
279
<p>Opens an editor for the give <i>item</i>. The editor remains open after editing.</p>
 
280
<p>See also <a href="qtablewidget.html#closePersistentEditor">closePersistentEditor</a>().</p>
 
281
<h3 class="fn"><a name="removeColumn"></a>void QTableWidget::removeColumn ( int <i>column</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
282
<p>Removes the column <i>column</i> and all its items from the table.</p>
 
283
<h3 class="fn"><a name="removeRow"></a>void QTableWidget::removeRow ( int <i>row</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
284
<p>Removes the row <i>row</i> and all its items from the table.</p>
 
285
<h3 class="fn"><a name="row"></a>int QTableWidget::row ( const <a href="qtablewidgetitem.html">QTableWidgetItem</a> * <i>item</i> ) const</h3>
 
286
<p>Returns the row for the <i>item</i>.</p>
 
287
<h3 class="fn"><a name="scrollToItem"></a>void QTableWidget::scrollToItem ( const <a href="qtablewidgetitem.html">QTableWidgetItem</a> * <i>item</i>, <a href="qabstractitemview.html#ScrollHint-enum">ScrollHint</a> <i>hint</i> = EnsureVisible )&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
288
<p>Scrolls the view if necessary to ensure that the <i>item</i> is visible. The <i>hint</i> parameter specifies more precisely where the <i>item</i> should be located after the operation.</p>
 
289
<h3 class="fn"><a name="selectedItems"></a><a href="qlist.html">QList</a>&lt;<a href="qtablewidgetitem.html">QTableWidgetItem</a> *&gt; QTableWidget::selectedItems ()</h3>
 
290
<p>Returns a list of all selected items.</p>
 
291
<h3 class="fn"><a name="selectedRanges"></a><a href="qlist.html">QList</a>&lt;<a href="qtablewidgetselectionrange.html">QTableWidgetSelectionRange</a>&gt; QTableWidget::selectedRanges () const</h3>
 
292
<p>Returns a list of all selected ranges.</p>
 
293
<p>See also <a href="qtablewidgetselectionrange.html">QTableWidgetSelectionRange</a>.</p>
 
294
<h3 class="fn"><a name="setCurrentItem"></a>void QTableWidget::setCurrentItem ( <a href="qtablewidgetitem.html">QTableWidgetItem</a> * <i>item</i> )</h3>
 
295
<p>Sets the current item to <i>item</i>.</p>
 
296
<h3 class="fn"><a name="setHorizontalHeaderItem"></a>void QTableWidget::setHorizontalHeaderItem ( int <i>column</i>, <a href="qtablewidgetitem.html">QTableWidgetItem</a> * <i>item</i> )</h3>
 
297
<p>Sets the horizontal header item for column <i>column</i> to <i>item</i>.</p>
 
298
<h3 class="fn"><a name="setHorizontalHeaderLabels"></a>void QTableWidget::setHorizontalHeaderLabels ( const <a href="qstringlist.html">QStringList</a> &amp; <i>labels</i> )</h3>
 
299
<p>Sets the horizontal header labels using <i>labels</i>.</p>
 
300
<h3 class="fn"><a name="setItem"></a>void QTableWidget::setItem ( int <i>row</i>, int <i>column</i>, <a href="qtablewidgetitem.html">QTableWidgetItem</a> * <i>item</i> )</h3>
 
301
<p>Sets the item for the given <i>row</i> and <i>column</i> to <i>item</i>.</p>
 
302
<p>See also <a href="qtablewidget.html#item">item</a>().</p>
 
303
<h3 class="fn"><a name="setItemPrototype"></a>void QTableWidget::setItemPrototype ( const <a href="qtablewidgetitem.html">QTableWidgetItem</a> * <i>item</i> )</h3>
 
304
<p>Sets the item prototype for the table to the specified <i>item</i>.</p>
 
305
<p>See also <a href="qtablewidget.html#itemPrototype">itemPrototype</a>().</p>
 
306
<h3 class="fn"><a name="setItemSelected"></a>void QTableWidget::setItemSelected ( const <a href="qtablewidgetitem.html">QTableWidgetItem</a> * <i>item</i>, bool <i>select</i> )</h3>
 
307
<p>Selects or deselects <i>item</i> depending on <i>select</i>.</p>
 
308
<h3 class="fn"><a name="setRangeSelected"></a>void QTableWidget::setRangeSelected ( const <a href="qtablewidgetselectionrange.html">QTableWidgetSelectionRange</a> &amp; <i>range</i>, bool <i>select</i> )</h3>
 
309
<p>Selects or deselects the <i>range</i> depending on <i>select</i>.</p>
 
310
<h3 class="fn"><a name="setVerticalHeaderItem"></a>void QTableWidget::setVerticalHeaderItem ( int <i>row</i>, <a href="qtablewidgetitem.html">QTableWidgetItem</a> * <i>item</i> )</h3>
 
311
<p>Sets the vertical header item for row <i>row</i> to <i>item</i>.</p>
 
312
<h3 class="fn"><a name="setVerticalHeaderLabels"></a>void QTableWidget::setVerticalHeaderLabels ( const <a href="qstringlist.html">QStringList</a> &amp; <i>labels</i> )</h3>
 
313
<p>Sets the vertical header labels using <i>labels</i>.</p>
 
314
<h3 class="fn"><a name="sortItems"></a>void QTableWidget::sortItems ( int <i>column</i>, <a href="qt.html#SortOrder-enum">Qt::SortOrder</a> <i>order</i> = Qt::AscendingOrder )</h3>
 
315
<p>Sorts all the rows in the table widget based on <i>column</i> and <i>order</i>.</p>
 
316
<h3 class="fn"><a name="supportedDropActions"></a><a href="qt.html#DropAction-enum">Qt::DropActions</a> QTableWidget::supportedDropActions () const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
317
<p>Returns the drop actions supported by this view.</p>
 
318
<p>See also <a href="qt.html#DropAction-enum">Qt::DropActions</a>.</p>
 
319
<h3 class="fn"><a name="takeItem"></a><a href="qtablewidgetitem.html">QTableWidgetItem</a> * QTableWidget::takeItem ( int <i>row</i>, int <i>column</i> )</h3>
 
320
<p>Removes the item at <i>row</i> and <i>column</i> from the table without deleting it.</p>
 
321
<h3 class="fn"><a name="verticalHeaderItem"></a><a href="qtablewidgetitem.html">QTableWidgetItem</a> * QTableWidget::verticalHeaderItem ( int <i>row</i> ) const</h3>
 
322
<p>Returns the vertical header item for row <i>row</i>.</p>
 
323
<h3 class="fn"><a name="visualColumn"></a>int QTableWidget::visualColumn ( int <i>logicalColumn</i> ) const</h3>
 
324
<p>Returns the visual column of the given <i>logicalColumn</i>.</p>
 
325
<h3 class="fn"><a name="visualItemRect"></a><a href="qrect.html">QRect</a> QTableWidget::visualItemRect ( const <a href="qtablewidgetitem.html">QTableWidgetItem</a> * <i>item</i> ) const</h3>
 
326
<p>Returns the rectangle on the viewport occupied by the item at <i>item</i>.</p>
 
327
<h3 class="fn"><a name="visualRow"></a>int QTableWidget::visualRow ( int <i>logicalRow</i> ) const</h3>
 
328
<p>Returns the visual row of the given <i>logicalRow</i>.</p>
 
329
<p /><address><hr /><div align="center">
 
330
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
331
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
332
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
333
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
334
</tr></table></div></address></body>
 
335
</html>