Class: QgsAbstractDbSourceSelect¶
The QgsAbstractDbSourceSelect
class is a base class for
database source widget selector
Added in version 3.24.
Class Hierarchy¶
Base classes¶
Abstract base Data Source Widget to create connections and add layers This class provides common functionality and the interface for all source select dialogs used by data providers to configure data sources and add layers. |
|
Methods
Sets the source model for the table and optionally a delegate |
|
Returns the proxy model used to filter the results |
|
This is called to define the SQL query and must be re-implemented. |
|
Called on click for the source index |
|
Called on double-click for the source index |
- class qgis.gui.QgsAbstractDbSourceSelect[source]¶
Bases:
QgsAbstractDataSourceWidget
- __init__(parent: QWidget | None = None, fl: Qt.WindowFlags | Qt.WindowType = QgsGuiUtils.ModalDialogFlags, widgetMode: QgsProviderRegistry.WidgetMode = QgsProviderRegistry.WidgetMode.Standalone)
Constructor
- Parameters:
parent (Optional[QWidget] = None)
fl (Union[Qt.WindowFlags, Qt.WindowType] = QgsGuiUtils.ModalDialogFlags)
widgetMode (QgsProviderRegistry.WidgetMode = QgsProviderRegistry.WidgetMode.Standalone)
- init(self, model: QgsAbstractDbTableModel | None, delegate: QItemDelegate | None = None)[source]¶
Sets the source model for the table and optionally a delegate
- Parameters:
model (Optional[QgsAbstractDbTableModel])
delegate (Optional[QItemDelegate] = None)
- proxyModel(self) QSortFilterProxyModel | None [source]¶
Returns the proxy model used to filter the results
- Return type:
Optional[QSortFilterProxyModel]
- setSql(self, index: QModelIndex)[source]¶
This is called to define the SQL query and must be re-implemented. The implementation should call
QgsAbstractDbTableModel
.setSql The index is in the source model.- Parameters:
index (QModelIndex)