class TableModel(QAbstractTableModel):
Method | __init__ |
Initializes a table model. |
Method | columnCount |
Gets the number of columns. Note: Enabling allow_delete adds an extra column for the row delete buttons. |
Method | data |
Gets a cell value. |
Method | flags |
Gets the flags for a cell. |
Method | headerData |
Sets the header data. |
Method | is_widget |
Checks if the cell is a widget button. |
Method | rowCount |
Gets the number of rows. |
Method | setData |
Sets a cell value. |
Instance Variable | _col_is_widget |
Undocumented |
Instance Variable | _col_keys |
Undocumented |
Instance Variable | _data |
Undocumented |
Instance Variable | _row_keys |
Undocumented |
Parameters | |
parent:QTableView | QTableView |
data:List[ | Data (2D) |
row_keys:List[ | List of vertical header strings |
col_keys:List[ | List of horizontal header strings |
col_is_widget:Optional[ | Indicates columns contains only widgets instead of only data (may be None for data-only) |
Parameters | |
parent:QtCore.QModelIndex | Undocumented |
Returns | |
Number of columns |
Parameters | |
index:QtCore.QModelIndex | Cell index |
role:int | Data role |
Returns | |
QVariant | Cell value |
Parameters | |
index:QtCore.QModelIndex | Cell index |
Returns | |
int | Cell flags |
Parameters | |
section:int | Row or column |
orientation:Qt.Orientation | Orientation |
role:int | Data role |
Returns | |
QVariant | Undocumented |
Parameters | |
index:QtCore.QModelIndex | Cell index |
Returns | |
bool | True if the cell is a widget, False otherwise |
Parameters | |
parent:QtCore.QModelIndex | Undocumented |
Returns | |
Number of rows |