Qt 4.8
qtablewidget.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtGui module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef QTABLEWIDGET_H
43 #define QTABLEWIDGET_H
44 
45 #include <QtGui/qtableview.h>
46 #include <QtCore/qvariant.h>
47 #include <QtCore/qvector.h>
48 //#include <QtGui/qitemselectionmodel.h>
49 
51 
53 
54 QT_MODULE(Gui)
55 
56 #ifndef QT_NO_TABLEWIDGET
57 
59 {
60 public:
62  QTableWidgetSelectionRange(int top, int left, int bottom, int right);
65 
66  inline int topRow() const { return top; }
67  inline int bottomRow() const { return bottom; }
68  inline int leftColumn() const { return left; }
69  inline int rightColumn() const { return right; }
70  inline int rowCount() const { return bottom - top + 1; }
71  inline int columnCount() const { return right - left + 1; }
72 
73 private:
74  int top, left, bottom, right;
75 };
76 
77 class QTableWidget;
78 class QTableModel;
79 class QWidgetItemData;
81 
83 {
84  friend class QTableWidget;
85  friend class QTableModel;
86 public:
87  enum ItemType { Type = 0, UserType = 1000 };
88  QTableWidgetItem(int type = Type);
89  explicit QTableWidgetItem(const QString &text, int type = Type);
90  explicit QTableWidgetItem(const QIcon &icon, const QString &text, int type = Type);
91  QTableWidgetItem(const QTableWidgetItem &other);
92  virtual ~QTableWidgetItem();
93 
94  virtual QTableWidgetItem *clone() const;
95 
96  inline QTableWidget *tableWidget() const { return view; }
97 
98  inline int row() const;
99  inline int column() const;
100 
101  inline void setSelected(bool select);
102  inline bool isSelected() const;
103 
104  inline Qt::ItemFlags flags() const { return itemFlags; }
105  void setFlags(Qt::ItemFlags flags);
106 
107  inline QString text() const
108  { return data(Qt::DisplayRole).toString(); }
109  inline void setText(const QString &text);
110 
111  inline QIcon icon() const
113  inline void setIcon(const QIcon &icon);
114 
115  inline QString statusTip() const
116  { return data(Qt::StatusTipRole).toString(); }
117  inline void setStatusTip(const QString &statusTip);
118 
119 #ifndef QT_NO_TOOLTIP
120  inline QString toolTip() const
121  { return data(Qt::ToolTipRole).toString(); }
122  inline void setToolTip(const QString &toolTip);
123 #endif
124 
125 #ifndef QT_NO_WHATSTHIS
126  inline QString whatsThis() const
127  { return data(Qt::WhatsThisRole).toString(); }
128  inline void setWhatsThis(const QString &whatsThis);
129 #endif
130 
131  inline QFont font() const
132  { return qvariant_cast<QFont>(data(Qt::FontRole)); }
133  inline void setFont(const QFont &font);
134 
135  inline int textAlignment() const
136  { return data(Qt::TextAlignmentRole).toInt(); }
137  inline void setTextAlignment(int alignment)
138  { setData(Qt::TextAlignmentRole, alignment); }
139 
140  inline QColor backgroundColor() const
142  inline void setBackgroundColor(const QColor &color)
143  { setData(Qt::BackgroundColorRole, color); }
144 
145  inline QBrush background() const
147  inline void setBackground(const QBrush &brush)
148  { setData(Qt::BackgroundRole, brush); }
149 
150  inline QColor textColor() const
152  inline void setTextColor(const QColor &color)
153  { setData(Qt::TextColorRole, color); }
154 
155  inline QBrush foreground() const
157  inline void setForeground(const QBrush &brush)
158  { setData(Qt::ForegroundRole, brush); }
159 
160  inline Qt::CheckState checkState() const
161  { return static_cast<Qt::CheckState>(data(Qt::CheckStateRole).toInt()); }
162  inline void setCheckState(Qt::CheckState state)
163  { setData(Qt::CheckStateRole, state); }
164 
165  inline QSize sizeHint() const
167  inline void setSizeHint(const QSize &size)
168  { setData(Qt::SizeHintRole, size); }
169 
170  virtual QVariant data(int role) const;
171  virtual void setData(int role, const QVariant &value);
172 
173  virtual bool operator<(const QTableWidgetItem &other) const;
174 
175 #ifndef QT_NO_DATASTREAM
176  virtual void read(QDataStream &in);
177  virtual void write(QDataStream &out) const;
178 #endif
179  QTableWidgetItem &operator=(const QTableWidgetItem &other);
180 
181  inline int type() const { return rtti; }
182 
183 private:
184  int rtti;
188  Qt::ItemFlags itemFlags;
189 };
190 
191 inline void QTableWidgetItem::setText(const QString &atext)
192 { setData(Qt::DisplayRole, atext); }
193 
194 inline void QTableWidgetItem::setIcon(const QIcon &aicon)
195 { setData(Qt::DecorationRole, aicon); }
196 
197 inline void QTableWidgetItem::setStatusTip(const QString &astatusTip)
198 { setData(Qt::StatusTipRole, astatusTip); }
199 
200 #ifndef QT_NO_TOOLTIP
201 inline void QTableWidgetItem::setToolTip(const QString &atoolTip)
202 { setData(Qt::ToolTipRole, atoolTip); }
203 #endif
204 
205 #ifndef QT_NO_WHATSTHIS
206 inline void QTableWidgetItem::setWhatsThis(const QString &awhatsThis)
207 { setData(Qt::WhatsThisRole, awhatsThis); }
208 #endif
209 
210 inline void QTableWidgetItem::setFont(const QFont &afont)
211 { setData(Qt::FontRole, afont); }
212 
213 #ifndef QT_NO_DATASTREAM
216 #endif
217 
218 class QTableWidgetPrivate;
219 
221 {
222  Q_OBJECT
223  int rowCount;
225 
226  friend class QTableModel;
227 public:
228  explicit QTableWidget(QWidget *parent = 0);
229  QTableWidget(int rows, int columns, QWidget *parent = 0);
230  ~QTableWidget();
231 
232  void setRowCount(int rows);
233  int rowCount() const;
234 
235  void setColumnCount(int columns);
236  int columnCount() const;
237 
238  int row(const QTableWidgetItem *item) const;
239  int column(const QTableWidgetItem *item) const;
240 
241  QTableWidgetItem *item(int row, int column) const;
242  void setItem(int row, int column, QTableWidgetItem *item);
243  QTableWidgetItem *takeItem(int row, int column);
244 
245  QTableWidgetItem *verticalHeaderItem(int row) const;
246  void setVerticalHeaderItem(int row, QTableWidgetItem *item);
248 
249  QTableWidgetItem *horizontalHeaderItem(int column) const;
250  void setHorizontalHeaderItem(int column, QTableWidgetItem *item);
252  void setVerticalHeaderLabels(const QStringList &labels);
253  void setHorizontalHeaderLabels(const QStringList &labels);
254 
255  int currentRow() const;
256  int currentColumn() const;
257  QTableWidgetItem *currentItem() const;
258  void setCurrentItem(QTableWidgetItem *item);
259  void setCurrentItem(QTableWidgetItem *item, QItemSelectionModel::SelectionFlags command);
260  void setCurrentCell(int row, int column);
261  void setCurrentCell(int row, int column, QItemSelectionModel::SelectionFlags command);
262 
263  void sortItems(int column, Qt::SortOrder order = Qt::AscendingOrder);
264  void setSortingEnabled(bool enable);
265  bool isSortingEnabled() const;
266 
267  void editItem(QTableWidgetItem *item);
270 
271  QWidget *cellWidget(int row, int column) const;
272  void setCellWidget(int row, int column, QWidget *widget);
273  inline void removeCellWidget(int row, int column);
274 
275  bool isItemSelected(const QTableWidgetItem *item) const;
276  void setItemSelected(const QTableWidgetItem *item, bool select);
277  void setRangeSelected(const QTableWidgetSelectionRange &range, bool select);
278 
279  QList<QTableWidgetSelectionRange> selectedRanges() const;
280  QList<QTableWidgetItem*> selectedItems();
281  QList<QTableWidgetItem*> findItems(const QString &text, Qt::MatchFlags flags) const;
282 
283  int visualRow(int logicalRow) const;
284  int visualColumn(int logicalColumn) const;
285 
286  QTableWidgetItem *itemAt(const QPoint &p) const;
287  inline QTableWidgetItem *itemAt(int x, int y) const;
288  QRect visualItemRect(const QTableWidgetItem *item) const;
289 
290  const QTableWidgetItem *itemPrototype() const;
291  void setItemPrototype(const QTableWidgetItem *item);
292 
293 public Q_SLOTS:
294  void scrollToItem(const QTableWidgetItem *item, QAbstractItemView::ScrollHint hint = EnsureVisible);
295  void insertRow(int row);
296  void insertColumn(int column);
297  void removeRow(int row);
298  void removeColumn(int column);
299  void clear();
300  void clearContents();
301 
302 Q_SIGNALS:
303  void itemPressed(QTableWidgetItem *item);
304  void itemClicked(QTableWidgetItem *item);
305  void itemDoubleClicked(QTableWidgetItem *item);
306 
307  void itemActivated(QTableWidgetItem *item);
308  void itemEntered(QTableWidgetItem *item);
309  void itemChanged(QTableWidgetItem *item);
310 
311  void currentItemChanged(QTableWidgetItem *current, QTableWidgetItem *previous);
312  void itemSelectionChanged();
313 
314  void cellPressed(int row, int column);
315  void cellClicked(int row, int column);
316  void cellDoubleClicked(int row, int column);
317 
318  void cellActivated(int row, int column);
319  void cellEntered(int row, int column);
320  void cellChanged(int row, int column);
321 
322  void currentCellChanged(int currentRow, int currentColumn, int previousRow, int previousColumn);
323 
324 protected:
325  bool event(QEvent *e);
326  virtual QStringList mimeTypes() const;
327  virtual QMimeData *mimeData(const QList<QTableWidgetItem*> items) const;
328  virtual bool dropMimeData(int row, int column, const QMimeData *data, Qt::DropAction action);
329  virtual Qt::DropActions supportedDropActions() const;
330  QList<QTableWidgetItem*> items(const QMimeData *data) const;
331 
332  QModelIndex indexFromItem(QTableWidgetItem *item) const;
333  QTableWidgetItem *itemFromIndex(const QModelIndex &index) const;
334  void dropEvent(QDropEvent *event);
335 
336 private:
337  void setModel(QAbstractItemModel *model);
338 
341 
342  Q_PRIVATE_SLOT(d_func(), void _q_emitItemPressed(const QModelIndex &index))
343  Q_PRIVATE_SLOT(d_func(), void _q_emitItemClicked(const QModelIndex &index))
344  Q_PRIVATE_SLOT(d_func(), void _q_emitItemDoubleClicked(const QModelIndex &index))
345  Q_PRIVATE_SLOT(d_func(), void _q_emitItemActivated(const QModelIndex &index))
346  Q_PRIVATE_SLOT(d_func(), void _q_emitItemEntered(const QModelIndex &index))
347  Q_PRIVATE_SLOT(d_func(), void _q_emitItemChanged(const QModelIndex &index))
348  Q_PRIVATE_SLOT(d_func(), void _q_emitCurrentItemChanged(const QModelIndex &previous, const QModelIndex &current))
349  Q_PRIVATE_SLOT(d_func(), void _q_sort())
350  Q_PRIVATE_SLOT(d_func(), void _q_dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight))
351 };
352 
353 inline void QTableWidget::removeCellWidget(int arow, int acolumn)
354 { setCellWidget(arow, acolumn, 0); }
355 
356 inline QTableWidgetItem *QTableWidget::itemAt(int ax, int ay) const
357 { return itemAt(QPoint(ax, ay)); }
358 
359 inline int QTableWidgetItem::row() const
360 { return (view ? view->row(this) : -1); }
361 
362 inline int QTableWidgetItem::column() const
363 { return (view ? view->column(this) : -1); }
364 
365 inline void QTableWidgetItem::setSelected(bool aselect)
366 { if (view) view->setItemSelected(this, aselect); }
367 
368 inline bool QTableWidgetItem::isSelected() const
369 { return (view ? view->isItemSelected(this) : false); }
370 
371 #endif // QT_NO_TABLEWIDGET
372 
374 
376 
377 #endif // QTABLEWIDGET_H
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:92
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition: qcolor.h:67
CheckState
Definition: qnamespace.h:1607
Qt::ItemFlags flags(const QModelIndex &index) const
Returns the item flags for the given index.
The QTableWidgetSelectionRange class provides a way to interact with selection in a model without usi...
Definition: qtablewidget.h:58
Q_GUI_EXPORT QDataStream & operator<<(QDataStream &out, const QTableWidgetItem &item)
void openPersistentEditor(const QModelIndex &index)
Opens a persistent editor on the item at the given index.
QFont font() const
Returns the font used to render the item&#39;s text.
Definition: qtablewidget.h:131
int type
Definition: qmetatype.cpp:239
bool removeRow(int row, const QModelIndex &parent=QModelIndex())
Removes the given row from the child items of the parent specified.
void setCheckState(Qt::CheckState state)
Sets the check state of the table item to be state.
Definition: qtablewidget.h:162
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
int textAlignment() const
Returns the text alignment for the item&#39;s text.
Definition: qtablewidget.h:135
EventRef event
QPointer< QWidget > widget
int column() const
Returns the column of the item in the table.
Definition: qtablewidget.h:362
#define QT_MODULE(x)
Definition: qglobal.h:2783
void setItemPrototype(const QTableWidgetItem *item)
ItemType
This enum describes the types that are used to describe table widget items.
Definition: qtablewidget.h:87
QString toolTip() const
Returns the item&#39;s tooltip.
Definition: qtablewidget.h:120
QBrush background() const
Returns the brush used to render the item&#39;s background.
Definition: qtablewidget.h:145
#define QT_BEGIN_HEADER
Definition: qglobal.h:136
void setForeground(const QBrush &brush)
Sets the item&#39;s foreground brush to the specified brush.
Definition: qtablewidget.h:157
void setBackground(const QBrush &brush)
Sets the item&#39;s background brush to the specified brush.
Definition: qtablewidget.h:147
int columnCount() const
Returns the number of columns in the range.
Definition: qtablewidget.h:71
void setModel(QAbstractItemModel *model)
Reimplemented Function
#define Q_GUI_EXPORT
Definition: qglobal.h:1450
const QTableWidgetItem * itemPrototype() const
bool isSelected() const
Returns true if the item is selected, otherwise returns false.
Definition: qtablewidget.h:368
The QTableWidget class provides an item-based table view with a default model.
Definition: qtablewidget.h:220
int bottomRow() const
Returns the bottom row of the range.
Definition: qtablewidget.h:67
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
static void clear(QVariant::Private *d)
Definition: qvariant.cpp:197
int select(int, fd_set *, fd_set *, fd_set *, struct timeval *)
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
Reimplemented Function
QTableWidget * view
Definition: qtablewidget.h:186
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
Definition: qglobal.h:2523
#define Q_PRIVATE_SLOT(d, signature)
Definition: qobjectdefs.h:73
int row() const
Returns the row of the item in the table.
Definition: qtablewidget.h:359
#define Q_SLOTS
Definition: qobjectdefs.h:71
The QString class provides a Unicode character string.
Definition: qstring.h:83
void setToolTip(const QString &toolTip)
Sets the item&#39;s tooltip to the string specified by toolTip.
Definition: qtablewidget.h:201
void setItem(int row, int column, QTableWidgetItem *item)
Q_GUI_EXPORT QDataStream & operator>>(QDataStream &in, QTableWidgetItem &item)
QTableWidgetItem * takeVerticalHeaderItem(int section)
#define Q_SIGNALS
Definition: qobjectdefs.h:72
QVector< QWidgetItemData > values
Definition: qtablewidget.h:185
bool operator<(int priority, const QPair< QRunnable *, int > &p)
Definition: qthreadpool.cpp:50
QString whatsThis() const
Returns the item&#39;s "What&#39;s This?" help.
Definition: qtablewidget.h:126
Q_CORE_EXPORT QTextStream & right(QTextStream &s)
void setIcon(const QIcon &icon)
Sets the item&#39;s icon to the icon specified.
Definition: qtablewidget.h:194
void setTextAlignment(int alignment)
Sets the text alignment for the item&#39;s text to the alignment specified.
Definition: qtablewidget.h:137
int leftColumn() const
Returns the left column of the range.
Definition: qtablewidget.h:68
QTableWidgetItemPrivate * d
Definition: qtablewidget.h:187
void dropEvent(QDropEvent *event)
This function is called with the given event when a drop event occurs over the widget.
QTableWidgetItem * item(int row, int column) const
SortOrder
Definition: qnamespace.h:189
void setSelected(bool select)
Sets the selected state of the item to select.
Definition: qtablewidget.h:365
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
void clearContents()
void setWhatsThis(const QString &whatsThis)
Sets the item&#39;s "What&#39;s This?" help to the string specified by whatsThis.
Definition: qtablewidget.h:206
bool insertRow(int row, const QModelIndex &parent=QModelIndex())
Inserts a single row before the given row in the child items of the parent specified.
static bool setData(const QByteArray &data, STGMEDIUM *pmedium)
Definition: qmime_win.cpp:141
The QStringList class provides a list of strings.
Definition: qstringlist.h:66
QTableWidgetItem * itemAt(const QPoint &p) const
Returns a pointer to the item at the given point, or returns 0 if point is not covered by an item in ...
QString statusTip() const
Returns the item&#39;s status tip.
Definition: qtablewidget.h:115
static const char * data(const QByteArray &arr)
Qt::DropActions supportedDropActions() const
Returns the drop actions supported by this model.
void setStatusTip(const QString &statusTip)
Sets the status tip for the table item to the text specified by statusTip.
Definition: qtablewidget.h:197
DropAction
Definition: qnamespace.h:1597
void setFont(const QFont &font)
Sets the font used to display the item&#39;s text to the given font.
Definition: qtablewidget.h:210
Qt::CheckState checkState() const
Returns the checked state of the table item.
Definition: qtablewidget.h:160
The QMimeData class provides a container for data that records information about its MIME type...
Definition: qmimedata.h:57
QString text() const
Returns the item&#39;s text.
Definition: qtablewidget.h:107
The QTableView class provides a default model/view implementation of a table view.
Definition: qtableview.h:58
QTableWidgetItem * verticalHeaderItem(int section)
#define Q_OBJECT
Definition: qobjectdefs.h:157
The QAbstractItemModel class provides the abstract interface for item model classes.
Qt::ItemFlags flags() const
Returns the flags used to describe the item.
Definition: qtablewidget.h:104
bool removeColumn(int column, const QModelIndex &parent=QModelIndex())
Removes the given column from the child items of the parent specified.
void setBackgroundColor(const QColor &color)
This function is deprecated.
Definition: qtablewidget.h:142
void setColumnCount(int columns)
The QBrush class defines the fill pattern of shapes drawn by QPainter.
Definition: qbrush.h:76
bool insertColumn(int column, const QModelIndex &parent=QModelIndex())
Inserts a single column before the given column in the child items of the parent specified.
The QDropEvent class provides an event which is sent when a drag and drop action is completed...
Definition: qevent.h:476
QMimeData * mimeData(const QModelIndexList &indexes) const
Returns an object that contains serialized items of data corresponding to the list of indexes specifi...
The QFont class specifies a font used for drawing text.
Definition: qfont.h:64
void setRowCount(int rows)
QObject * parent() const
Returns a pointer to the parent object.
Definition: qobject.h:273
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
void setHorizontalHeaderItem(int section, QTableWidgetItem *item)
int columnCount
the number of columns in the table
Definition: qtablewidget.h:224
int columnCount(const QModelIndex &parent=QModelIndex()) const
Returns the number of columns for the children of the given parent.
QColor backgroundColor() const
This function is deprecated.
Definition: qtablewidget.h:140
int rowCount() const
Returns the number of rows in the range.
Definition: qtablewidget.h:70
The QModelIndex class is used to locate data in a data model.
void setSizeHint(const QSize &size)
Sets the size hint for the table item to be size.
Definition: qtablewidget.h:167
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
QTableWidgetItem * horizontalHeaderItem(int section)
T qvariant_cast(const QVariant &)
Definition: qvariant.h:571
QTableWidgetItem * takeHorizontalHeaderItem(int section)
quint16 index
void setSortingEnabled(bool enable)
If enabled true enables sorting for the table and immediately trigger a call to sortByColumn() with t...
void setTextColor(const QColor &color)
This function is deprecated.
Definition: qtablewidget.h:152
int topRow() const
Returns the top row of the range.
Definition: qtablewidget.h:66
int rowCount(const QModelIndex &parent=QModelIndex()) const
Returns the number of rows under the given parent.
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:53
#define Q_DECLARE_PRIVATE(Class)
Definition: qglobal.h:2467
QStringList mimeTypes() const
Returns a list of MIME types that can be used to describe a list of model indexes.
The QDataStream class provides serialization of binary data to a QIODevice.
Definition: qdatastream.h:71
void setText(const QString &text)
Sets the item&#39;s text to the text specified.
Definition: qtablewidget.h:191
void closePersistentEditor(const QModelIndex &index)
Closes the persistent editor for the item at the given index.
int type() const
Returns the type passed to the QTableWidgetItem constructor.
Definition: qtablewidget.h:181
int rightColumn() const
Returns the right column of the range.
Definition: qtablewidget.h:69
QSize sizeHint() const
Returns the size hint set for the table item.
Definition: qtablewidget.h:165
The QTableWidgetItem class provides an item for use with the QTableWidget class.
Definition: qtablewidget.h:82
bool event(QEvent *event)
Reimplemented Function
The QEvent class is the base class of all event classes.
Definition: qcoreevent.h:56
Q_CORE_EXPORT QTextStream & left(QTextStream &s)
#define QT_END_HEADER
Definition: qglobal.h:137
bool isSortingEnabled() const
QIcon icon() const
Returns the item&#39;s icon.
Definition: qtablewidget.h:111
QColor textColor() const
This function is deprecated.
Definition: qtablewidget.h:150
QTableWidget * tableWidget() const
Returns the table widget that contains the item.
Definition: qtablewidget.h:96
int rowCount
the number of rows in the table
Definition: qtablewidget.h:223
QTableWidgetItem * takeItem(int row, int column)
#define text
Definition: qobjectdefs.h:80
Qt::ItemFlags itemFlags
Definition: qtablewidget.h:188
The QList class is a template class that provides lists.
Definition: qdatastream.h:62
static void clone(QMetaObjectBuilder &builder, const QMetaObject *mo, const QMetaObject *ignoreStart, const QMetaObject *ignoreEnd)
void setVerticalHeaderItem(int section, QTableWidgetItem *item)
void itemChanged(QTableWidgetItem *item)
QBrush foreground() const
Returns the brush used to render the item&#39;s foreground (e.
Definition: qtablewidget.h:155
The QIcon class provides scalable icons in different modes and states.
Definition: qicon.h:60