Описание тега qabstracttablemodel
QAbstractTableModel is a class in Qt for models that represent their data as a two-dimentional array of items.
The QAbstractTableModel
class can't be used directly, but one can subclass his own class from it to represent a specific Table Model. However, the interface of this class is more specialized than QAbstractItemModel
, so your derived classes can't be used in tree views.
A list of functions that need to be implemented when subclassing QAbstractTableModel
includes:
rowCount()
columnCount()
data()
headerData()
setData()
1flags()
1insertRows()
2removeRows()
2insertColumns()
2removeColumns()
2
1: for models that support editing.
2: for models with resizable data structure.
Official documentation is available here.