- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Friends

# QTableWidgetItem Class Reference

Search for all occurrences

## Detailed Description

Definition at line 82 of file qtablewidget.h.

`#include <qtablewidget.h>`

List of all members.

## Public Types
enum | ItemType { Type = 0, UserType = 1000 }
## Public Member Functions
| QTableWidgetItem (int type=Type)
| QTableWidgetItem (const QString &text, int type=Type)
| QTableWidgetItem (const QIcon &icon, const QString &text, int type=Type)
| QTableWidgetItem (const QTableWidgetItem &other)
virtual | ~QTableWidgetItem ()
virtual QTableWidgetItem * | clone () const
QTableWidget * | tableWidget () const
int | row () const
int | column () const
void | setSelected (bool select)
bool | isSelected () const
Qt::ItemFlags | flags () const
void | setFlags (Qt::ItemFlags flags)
QString | text () const
void | setText (const QString &text)
QIcon | icon () const
void | setIcon (const QIcon &icon)
QString | statusTip () const
void | setStatusTip (const QString &statusTip)
QString | toolTip () const
void | setToolTip (const QString &toolTip)
QString | whatsThis () const
void | setWhatsThis (const QString &whatsThis)
QFont | font () const
void | setFont (const QFont &font)
int | textAlignment () const
void | setTextAlignment (int alignment)
QColor | backgroundColor () const
void | setBackgroundColor (const QColor &color)
QBrush | background () const
void | setBackground (const QBrush &brush)
QColor | textColor () const
void | setTextColor (const QColor &color)
QBrush | foreground () const
void | setForeground (const QBrush &brush)
Qt::CheckState | checkState () const
void | setCheckState (Qt::CheckState state)
QSize | sizeHint () const
void | setSizeHint (const QSize &size)
virtual QVariant | data (int role) const
virtual void | setData (int role, const QVariant &value)
virtual bool | operator< (const QTableWidgetItem &other) const
virtual void | read (QDataStream &in)
virtual void | write (QDataStream &out) const
QTableWidgetItem & | operator= (const QTableWidgetItem &other)
int | type () const
## Friends
class | QTableWidget
class | QTableModel

## Member Enumeration Documentation

enum ItemType

Search for all occurrences

Enumerator:

  Type | Search for all occurrences
  UserType | Search for all occurrences

Definition at line 87 of file qtablewidget.h.

    { Type = 0, UserType = 1000 };

## Constructor & Destructor Documentation

QTableWidgetItem | ( | int | type = `Type` | ) |

QTableWidgetItem | ( | const QString & | text,
|  | int | type = `Type`
| ) |  | `[explicit]`

QTableWidgetItem | ( | const QIcon & | icon,
|  | const QString & | text,
|  | int | type = `Type`
| ) |  | `[explicit]`

QTableWidgetItem | ( | const QTableWidgetItem & | other | ) |

virtual ~QTableWidgetItem | ( |  | ) | `[virtual]`

## Member Function Documentation

virtual QTableWidgetItem* clone | ( |  | ) | const `[virtual]`

Search for all occurrences

QTableWidget* tableWidget | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 96 of file qtablewidget.h.

    { return view; }

int row | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 359 of file qtablewidget.h.

    { return (view ? view->row(this) : -1); }

int column | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 362 of file qtablewidget.h.

    { return (view ? view->column(this) : -1); }

void setSelected | ( | bool | select | ) | `[inline]`

Search for all occurrences

Definition at line 365 of file qtablewidget.h.

    { if (view) view->setItemSelected(this, aselect); }

bool isSelected | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 368 of file qtablewidget.h.

    { return (view ? view->isItemSelected(this) : false); }

Qt::ItemFlags flags | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 104 of file qtablewidget.h.

    { return itemFlags; }

void setFlags | ( | Qt::ItemFlags | flags | ) |

Search for all occurrences

QString text | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 107 of file qtablewidget.h.

            { return data(Qt::DisplayRole).toString(); }

void setText | ( | const QString & | text | ) | `[inline]`

Search for all occurrences

Definition at line 191 of file qtablewidget.h.

    { setData(Qt::DisplayRole, atext); }

QIcon icon | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 111 of file qtablewidget.h.

            { return qvariant_cast<QIcon>(data(Qt::DecorationRole)); }

void setIcon | ( | const QIcon & | icon | ) | `[inline]`

Search for all occurrences

Definition at line 194 of file qtablewidget.h.

    { setData(Qt::DecorationRole, aicon); }

QString statusTip | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 115 of file qtablewidget.h.

            { return data(Qt::StatusTipRole).toString(); }

void setStatusTip | ( | const QString & | statusTip | ) | `[inline]`

Search for all occurrences

Definition at line 197 of file qtablewidget.h.

    { setData(Qt::StatusTipRole, astatusTip); }

QString toolTip | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 120 of file qtablewidget.h.

            { return data(Qt::ToolTipRole).toString(); }

void setToolTip | ( | const QString & | toolTip | ) | `[inline]`

Search for all occurrences

Definition at line 201 of file qtablewidget.h.

    { setData(Qt::ToolTipRole, atoolTip); }

QString whatsThis | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 126 of file qtablewidget.h.

            { return data(Qt::WhatsThisRole).toString(); }

void setWhatsThis | ( | const QString & | whatsThis | ) | `[inline]`

Search for all occurrences

Definition at line 206 of file qtablewidget.h.

    { setData(Qt::WhatsThisRole, awhatsThis); }

QFont font | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 131 of file qtablewidget.h.

            { return qvariant_cast<QFont>(data(Qt::FontRole)); }

void setFont | ( | const QFont & | font | ) | `[inline]`

Search for all occurrences

Definition at line 210 of file qtablewidget.h.

    { setData(Qt::FontRole, afont); }

int textAlignment | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 135 of file qtablewidget.h.

            { return data(Qt::TextAlignmentRole).toInt(); }

void setTextAlignment | ( | int | alignment | ) | `[inline]`

Search for all occurrences

Definition at line 137 of file qtablewidget.h.

            { setData(Qt::TextAlignmentRole, alignment); }

QColor backgroundColor | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 140 of file qtablewidget.h.

            { return qvariant_cast<QColor>(data(Qt::BackgroundColorRole)); }

void setBackgroundColor | ( | const QColor & | color | ) | `[inline]`

Search for all occurrences

Definition at line 142 of file qtablewidget.h.

            { setData(Qt::BackgroundColorRole, color); }

QBrush background | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 145 of file qtablewidget.h.

            { return qvariant_cast<QBrush>(data(Qt::BackgroundRole)); }

void setBackground | ( | const QBrush & | brush | ) | `[inline]`

Search for all occurrences

Definition at line 147 of file qtablewidget.h.

            { setData(Qt::BackgroundRole, brush); }

QColor textColor | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 150 of file qtablewidget.h.

            { return qvariant_cast<QColor>(data(Qt::TextColorRole)); }

void setTextColor | ( | const QColor & | color | ) | `[inline]`

Search for all occurrences

Definition at line 152 of file qtablewidget.h.

            { setData(Qt::TextColorRole, color); }

QBrush foreground | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 155 of file qtablewidget.h.

            { return qvariant_cast<QBrush>(data(Qt::ForegroundRole)); }

void setForeground | ( | const QBrush & | brush | ) | `[inline]`

Search for all occurrences

Definition at line 157 of file qtablewidget.h.

            { setData(Qt::ForegroundRole, brush); }

Qt::CheckState checkState | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 160 of file qtablewidget.h.

            { return static_cast<Qt::CheckState>(data(Qt::CheckStateRole).toInt()); }

void setCheckState | ( | Qt::CheckState | state | ) | `[inline]`

Search for all occurrences

Definition at line 162 of file qtablewidget.h.

            { setData(Qt::CheckStateRole, state); }

QSize sizeHint | ( | void |  | ) | const `[inline]`

Search for all occurrences

Definition at line 165 of file qtablewidget.h.

            { return qvariant_cast<QSize>(data(Qt::SizeHintRole)); }

void setSizeHint | ( | const QSize & | size | ) | `[inline]`

Search for all occurrences

Definition at line 167 of file qtablewidget.h.

            { setData(Qt::SizeHintRole, size); }

virtual QVariant data | ( | int | role | ) | const `[virtual]`

Search for all occurrences

virtual void setData | ( | int | role,
|  | const QVariant & | value
| ) |  | `[virtual]`

Search for all occurrences

virtual bool operator< | ( | const QTableWidgetItem & | other | ) | const `[virtual]`

virtual void read | ( | QDataStream & | in | ) | `[virtual]`

Search for all occurrences

virtual void write | ( | QDataStream & | out | ) | const `[virtual]`

Search for all occurrences

QTableWidgetItem& operator= | ( | const QTableWidgetItem & | other | ) |

int type | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 181 of file qtablewidget.h.

    { return rtti; }

## Friends And Related Function Documentation

friend class QTableWidget `[friend]`

Search for all occurrences

Definition at line 84 of file qtablewidget.h.

friend class QTableModel `[friend]`

Search for all occurrences

Definition at line 85 of file qtablewidget.h.

The documentation for this class was generated from the following file:

- QtGui/qtablewidget.h

QTableWidgetItem QTableWidgetItem QTableWidgetItem QTableWidgetItem QTableWidgetItem QTableWidgetItem QTableWidgetItem QTableWidgetItem QTableWidgetItem QTableWidgetItem
QTableWidgetItem QTableWidgetItem QTableWidgetItem QTableWidgetItem QTableWidgetItem QTableWidgetItem QTableWidgetItem QTableWidgetItem QTableWidgetItem QTableWidgetItem