Class: QgsAbstractDbTableModel¶
Pure virtual model class for results in a database source widget selector.
Added in version 3.24.
Note
This is an abstract class, with methods which must be implemented by a subclass.
The following methods must be implemented: columns()
, defaultSearchColumn()
, setSql()
Class Hierarchy¶
Base classes¶
Abstract 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) |
|
Sets an sql statement that belongs to a cell specified by a model index |
Virtual Methods
In PyQGIS, only methods marked as virtual
can be safely overridden in a Python subclass of QgsAbstractDbTableModel. See the FAQ for more details.
Returns if the column should be searchable at the given index |
- class qgis.core.QgsAbstractDbTableModel[source]¶
Bases:
QStandardItemModel
- __init__(parent: QObject | None = None)
Constructor
- Parameters:
parent (Optional[QObject] = None)
- abstract columns(self) List[str] [source]¶
Returns the list of columns in the table
- Return type:
List[str]
- abstract defaultSearchColumn(self) int [source]¶
Returns the index of the column used by default to filter the results (probably the table name column if it exists)
- Return type:
int