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

- Class List
- Class Hierarchy
- Class Members

Signals | Public Member Functions | Protected Member Functions | Properties | Friends

# QStandardItemModel Class Reference

Search for all occurrences

## Detailed Description

Definition at line 318 of file qstandarditemmodel.h.

`#include <qstandarditemmodel.h>`

Inheritance diagram for QStandardItemModel:
[legend]

List of all members.

## Signals
void | itemChanged (QStandardItem *item)
## Public Member Functions
| QStandardItemModel (QObject *parent=0)
| QStandardItemModel (int rows, int columns, QObject *parent=0)
| ~QStandardItemModel ()
QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const
QModelIndex | parent (const QModelIndex &child) const
int | rowCount (const QModelIndex &parent=QModelIndex()) const
int | columnCount (const QModelIndex &parent=QModelIndex()) const
bool | hasChildren (const QModelIndex &parent=QModelIndex()) const
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const
bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
bool | setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role=Qt::EditRole)
bool | insertRows (int row, int count, const QModelIndex &parent=QModelIndex())
bool | insertColumns (int column, int count, const QModelIndex &parent=QModelIndex())
bool | removeRows (int row, int count, const QModelIndex &parent=QModelIndex())
bool | removeColumns (int column, int count, const QModelIndex &parent=QModelIndex())
Qt::ItemFlags | flags (const QModelIndex &index) const
Qt::DropActions | supportedDropActions () const
QMap< int, QVariant > | itemData (const QModelIndex &index) const
bool | setItemData (const QModelIndex &index, const QMap< int, QVariant > &roles)
void | clear ()
void | sort (int column, Qt::SortOrder order=Qt::AscendingOrder)
QStandardItem * | itemFromIndex (const QModelIndex &index) const
QModelIndex | indexFromItem (const QStandardItem *item) const
QStandardItem * | item (int row, int column=0) const
void | setItem (int row, int column, QStandardItem *item)
void | setItem (int row, QStandardItem *item)
QStandardItem * | invisibleRootItem () const
QStandardItem * | horizontalHeaderItem (int column) const
void | setHorizontalHeaderItem (int column, QStandardItem *item)
QStandardItem * | verticalHeaderItem (int row) const
void | setVerticalHeaderItem (int row, QStandardItem *item)
void | setHorizontalHeaderLabels (const QStringList &labels)
void | setVerticalHeaderLabels (const QStringList &labels)
void | setRowCount (int rows)
void | setColumnCount (int columns)
void | appendRow (const QList< QStandardItem * > &items)
void | appendColumn (const QList< QStandardItem * > &items)
void | appendRow (QStandardItem *item)
void | insertRow (int row, const QList< QStandardItem * > &items)
void | insertColumn (int column, const QList< QStandardItem * > &items)
void | insertRow (int row, QStandardItem *item)
bool | insertRow (int row, const QModelIndex &parent=QModelIndex())
bool | insertColumn (int column, const QModelIndex &parent=QModelIndex())
QStandardItem * | takeItem (int row, int column=0)
QList< QStandardItem * > | takeRow (int row)
QList< QStandardItem * > | takeColumn (int column)
QStandardItem * | takeHorizontalHeaderItem (int column)
QStandardItem * | takeVerticalHeaderItem (int row)
const QStandardItem * | itemPrototype () const
void | setItemPrototype (const QStandardItem *item)
QList< QStandardItem * > | findItems (const QString &text, Qt::MatchFlags flags=Qt::MatchExactly, int column=0) const
int | sortRole () const
void | setSortRole (int role)
QStringList | mimeTypes () const
QMimeData * | mimeData (const QModelIndexList &indexes) const
bool | dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
## Protected Member Functions
| QStandardItemModel (QStandardItemModelPrivate &dd, QObject *parent=0)
## Properties
int | sortRole
## Friends
class | QStandardItemPrivate
class | QStandardItem

## Constructor & Destructor Documentation

QStandardItemModel | ( | QObject * | parent = `0` | ) | `[explicit]`

QStandardItemModel | ( | int | rows,
|  | int | columns,
|  | QObject * | parent = `0`
| ) |  |

~QStandardItemModel | ( |  | ) |

QStandardItemModel | ( | QStandardItemModelPrivate & | dd,
|  | QObject * | parent = `0`
| ) |  | `[protected]`

## Member Function Documentation

QModelIndex index | ( | int | row,
|  | int | column,
|  | const QModelIndex & | parent = `QModelIndex()`
| ) |  | const `[virtual]`

Search for all occurrences

Implements QAbstractItemModel.

QModelIndex parent | ( | const QModelIndex & | child | ) | const `[virtual]`

Search for all occurrences

Implements QAbstractItemModel.

int rowCount | ( | const QModelIndex & | parent = `QModelIndex()` | ) | const `[virtual]`

Search for all occurrences

Implements QAbstractItemModel.

int columnCount | ( | const QModelIndex & | parent = `QModelIndex()` | ) | const `[virtual]`

Search for all occurrences

Implements QAbstractItemModel.

bool hasChildren | ( | const QModelIndex & | parent = `QModelIndex()` | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

QVariant data | ( | const QModelIndex & | index,
|  | int | role = `Qt::DisplayRole`
| ) |  | const `[virtual]`

Search for all occurrences

Implements QAbstractItemModel.

bool setData | ( | const QModelIndex & | index,
|  | const QVariant & | value,
|  | int | role = `Qt::EditRole`
| ) |  | `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

QVariant headerData | ( | int | section,
|  | Qt::Orientation | orientation,
|  | int | role = `Qt::DisplayRole`
| ) |  | const `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

bool setHeaderData | ( | int | section,
|  | Qt::Orientation | orientation,
|  | const QVariant & | value,
|  | int | role = `Qt::EditRole`
| ) |  | `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

bool insertRows | ( | int | row,
|  | int | count,
|  | const QModelIndex & | parent = `QModelIndex()`
| ) |  | `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

bool insertColumns | ( | int | column,
|  | int | count,
|  | const QModelIndex & | parent = `QModelIndex()`
| ) |  | `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

bool removeRows | ( | int | row,
|  | int | count,
|  | const QModelIndex & | parent = `QModelIndex()`
| ) |  | `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

bool removeColumns | ( | int | column,
|  | int | count,
|  | const QModelIndex & | parent = `QModelIndex()`
| ) |  | `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

Qt::ItemFlags flags | ( | const QModelIndex & | index | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

Qt::DropActions supportedDropActions | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

QMap<int, QVariant> itemData | ( | const QModelIndex & | index | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

bool setItemData | ( | const QModelIndex & | index,
|  | const QMap< int, QVariant > & | roles
| ) |  | `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

void clear | ( |  | ) |

Search for all occurrences

void sort | ( | int | column,
|  | Qt::SortOrder | order = `Qt::AscendingOrder`
| ) |  | `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

QStandardItem* itemFromIndex | ( | const QModelIndex & | index | ) | const

Search for all occurrences

QModelIndex indexFromItem | ( | const QStandardItem * | item | ) | const

Search for all occurrences

QStandardItem* item | ( | int | row,
|  | int | column = `0`
| ) |  | const

Search for all occurrences

void setItem | ( | int | row,
|  | int | column,
|  | QStandardItem * | item
| ) |  |

Search for all occurrences

void setItem | ( | int | row,
|  | QStandardItem * | item
| ) |  | `[inline]`

Search for all occurrences

Definition at line 431 of file qstandarditemmodel.h.

    { setItem(arow, 0, aitem); }

QStandardItem* invisibleRootItem | ( |  | ) | const

Search for all occurrences

QStandardItem* horizontalHeaderItem | ( | int | column | ) | const

Search for all occurrences

void setHorizontalHeaderItem | ( | int | column,
|  | QStandardItem * | item
| ) |  |

Search for all occurrences

QStandardItem* verticalHeaderItem | ( | int | row | ) | const

Search for all occurrences

void setVerticalHeaderItem | ( | int | row,
|  | QStandardItem * | item
| ) |  |

Search for all occurrences

void setHorizontalHeaderLabels | ( | const QStringList & | labels | ) |

Search for all occurrences

void setVerticalHeaderLabels | ( | const QStringList & | labels | ) |

Search for all occurrences

void setRowCount | ( | int | rows | ) |

Search for all occurrences

void setColumnCount | ( | int | columns | ) |

Search for all occurrences

void appendRow | ( | const QList< QStandardItem * > & | items | ) |

Search for all occurrences

void appendColumn | ( | const QList< QStandardItem * > & | items | ) |

Search for all occurrences

void appendRow | ( | QStandardItem * | item | ) | `[inline]`

Search for all occurrences

Definition at line 434 of file qstandarditemmodel.h.

    { appendRow(QList<QStandardItem*>() << aitem); }

void insertRow | ( | int | row,
|  | const QList< QStandardItem * > & | items
| ) |  |

Search for all occurrences

void insertColumn | ( | int | column,
|  | const QList< QStandardItem * > & | items
| ) |  |

Search for all occurrences

void insertRow | ( | int | row,
|  | QStandardItem * | item
| ) |  | `[inline]`

Search for all occurrences

Definition at line 437 of file qstandarditemmodel.h.

    { insertRow(arow, QList<QStandardItem*>() << aitem); }

bool insertRow | ( | int | row,
|  | const QModelIndex & | parent = `QModelIndex()`
| ) |  | `[inline]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

Definition at line 440 of file qstandarditemmodel.h.

    { return QAbstractItemModel::insertRow(arow, aparent); }

bool insertColumn | ( | int | column,
|  | const QModelIndex & | parent = `QModelIndex()`
| ) |  | `[inline]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

Definition at line 442 of file qstandarditemmodel.h.

    { return QAbstractItemModel::insertColumn(acolumn, aparent); }

QStandardItem* takeItem | ( | int | row,
|  | int | column = `0`
| ) |  |

Search for all occurrences

QList<QStandardItem*> takeRow | ( | int | row | ) |

Search for all occurrences

QList<QStandardItem*> takeColumn | ( | int | column | ) |

Search for all occurrences

QStandardItem* takeHorizontalHeaderItem | ( | int | column | ) |

Search for all occurrences

QStandardItem* takeVerticalHeaderItem | ( | int | row | ) |

Search for all occurrences

const QStandardItem* itemPrototype | ( |  | ) | const

Search for all occurrences

void setItemPrototype | ( | const QStandardItem * | item | ) |

Search for all occurrences

QList<QStandardItem*> findItems | ( | const QString & | text,
|  | Qt::MatchFlags | flags = `Qt::MatchExactly`,
|  | int | column = `0`
| ) |  | const

Search for all occurrences

int sortRole | ( |  | ) | const

Search for all occurrences

void setSortRole | ( | int | role | ) |

Search for all occurrences

QStringList mimeTypes | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

QMimeData* mimeData | ( | const QModelIndexList & | indexes | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

bool dropMimeData | ( | const QMimeData * | data,
|  | Qt::DropAction | action,
|  | int | row,
|  | int | column,
|  | const QModelIndex & | parent
| ) |  | `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

void itemChanged | ( | QStandardItem * | item | ) | `[signal]`

Search for all occurrences

## Friends And Related Function Documentation

friend class QStandardItemPrivate `[friend]`

Search for all occurrences

Definition at line 422 of file qstandarditemmodel.h.

friend class QStandardItem `[friend]`

Search for all occurrences

Definition at line 423 of file qstandarditemmodel.h.

## Property Documentation

int sortRole `[read, write]`

Search for all occurrences

Definition at line 321 of file qstandarditemmodel.h.

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

- QtGui/qstandarditemmodel.h

QStandardItemModel QStandardItemModel QStandardItemModel QStandardItemModel QStandardItemModel QStandardItemModel QStandardItemModel QStandardItemModel QStandardItemModel QStandardItemModel
QStandardItemModel QStandardItemModel QStandardItemModel QStandardItemModel QStandardItemModel QStandardItemModel QStandardItemModel QStandardItemModel QStandardItemModel QStandardItemModel