Class: QgsAbstractDbTableModel¶
- class qgis.core.QgsAbstractDbTableModel¶
Bases:
PyQt5.QtGui.QStandardItemModel
The
QgsAbstractDbTableModel
class is a pure virtual model class for results in a database source widget selectorNew in version 3.24.
QgsAbstractDbTableModel(parent: QObject = None) Constructor
Methods
Returns the list of columns in the table
Returns the index of the column used by default to filter the results (probably the table name column if it exists)
Returns if the column should be searchable at the given index
Sets an sql statement that belongs to a cell specified by a model index
- beginInsertColumns(self, QModelIndex, int, int)¶
- beginInsertRows(self, QModelIndex, int, int)¶
- beginMoveColumns(self, QModelIndex, int, int, QModelIndex, int) bool ¶
- beginMoveRows(self, QModelIndex, int, int, QModelIndex, int) bool ¶
- beginRemoveColumns(self, QModelIndex, int, int)¶
- beginRemoveRows(self, QModelIndex, int, int)¶
- beginResetModel(self)¶
- changePersistentIndex(self, QModelIndex, QModelIndex)¶
- changePersistentIndexList(self, Iterable[QModelIndex], Iterable[QModelIndex])¶
- childEvent(self, QChildEvent)¶
- columns(self) List[str] ¶
Returns the list of columns in the table
- Return type:
List[str]
- connectNotify(self, QMetaMethod)¶
- createIndex(self, int, int, object: object = 0) QModelIndex ¶
- customEvent(self, QEvent)¶
- decodeData(self, int, int, QModelIndex, QDataStream) bool ¶
- defaultSearchColumn(self) int ¶
Returns the index of the column used by default to filter the results (probably the table name column if it exists)
- Return type:
int
- disconnectNotify(self, QMetaMethod)¶
- encodeData(self, Iterable[QModelIndex], QDataStream)¶
- endInsertColumns(self)¶
- endInsertRows(self)¶
- endMoveColumns(self)¶
- endMoveRows(self)¶
- endRemoveColumns(self)¶
- endRemoveRows(self)¶
- endResetModel(self)¶
- isSignalConnected(self, QMetaMethod) bool ¶
- persistentIndexList(self) List[QModelIndex] ¶
- receivers(self, PYQT_SIGNAL) int ¶
- resetInternalData(self)¶
- searchableColumn(self, column: int) bool ¶
Returns if the column should be searchable at the given index
- Parameters:
column (int) –
- Return type:
bool
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setSql(self, index: QModelIndex, sql: str)¶
Sets an sql statement that belongs to a cell specified by a model index
- Parameters:
index (QModelIndex) –
sql (str) –
- timerEvent(self, QTimerEvent)¶