Class: QgsAbstractDbSourceSelect

class qgis.gui.QgsAbstractDbSourceSelect

Bases: QgsAbstractDataSourceWidget

The QgsAbstractDbSourceSelect class is a base class for database source widget selector

New in version 3.24.

QgsAbstractDbSourceSelect(parent: QWidget = None, fl: Union[Qt.WindowFlags, Qt.WindowType] = QgsGuiUtils.ModalDialogFlags, widgetMode: QgsProviderRegistry.WidgetMode = QgsProviderRegistry.WidgetMode.None) Constructor

Methods

actionEvent

addButton

Returns the add Button

browserModel

Returns the associated browser model (may be None).

changeEvent

childEvent

closeEvent

connectNotify

contextMenuEvent

create

customEvent

destroy

disconnectNotify

dragEnterEvent

dragLeaveEvent

dragMoveEvent

dropEvent

enterEvent

event

eventFilter

focusInEvent

focusNextChild

focusNextPrevChild

focusOutEvent

focusPreviousChild

hideEvent

init

Sets the source model for the table and optionally a delegate

initPainter

inputMethodEvent

isSignalConnected

keyPressEvent

keyReleaseEvent

leaveEvent

mapCanvas

Returns the map canvas (can be None)

metric

mouseDoubleClickEvent

mouseMoveEvent

mousePressEvent

mouseReleaseEvent

moveEvent

nativeEvent

paintEvent

proxyModel

Returns the proxy model used to filter the results

receivers

resizeEvent

sender

senderSignalIndex

setSql

This is called to define the SQL query and must be re-implemented.

setupButtons

Connect the ok and apply/add buttons to the slots

sharedPainter

showEvent

tabletEvent

timerEvent

treeviewClicked

param index

treeviewDoubleClicked

param index

updateMicroFocus

wheelEvent

widgetMode

Returns the widget mode

actionEvent(self, QActionEvent)
addButton(self) QPushButton

Returns the add Button

browserModel(self) QgsBrowserModel

Returns the associated browser model (may be None).

New in version 3.18.

changeEvent(self, QEvent)
childEvent(self, QChildEvent)
closeEvent(self, QCloseEvent)
connectNotify(self, QMetaMethod)
contextMenuEvent(self, QContextMenuEvent)
create(self, window: sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
customEvent(self, QEvent)
destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)
disconnectNotify(self, QMetaMethod)
dragEnterEvent(self, QDragEnterEvent)
dragLeaveEvent(self, QDragLeaveEvent)
dragMoveEvent(self, QDragMoveEvent)
dropEvent(self, QDropEvent)
enterEvent(self, QEvent)
event(self, QEvent) bool
eventFilter(self, QObject, QEvent) bool
focusInEvent(self, QFocusEvent)
focusNextChild(self) bool
focusNextPrevChild(self, bool) bool
focusOutEvent(self, QFocusEvent)
focusPreviousChild(self) bool
hideEvent(self, QHideEvent)
init(self, model: QgsAbstractDbTableModel, delegate: QItemDelegate = None)

Sets the source model for the table and optionally a delegate

Parameters
initPainter(self, QPainter)
inputMethodEvent(self, QInputMethodEvent)
isSignalConnected(self, QMetaMethod) bool
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
leaveEvent(self, QEvent)
mapCanvas(self) QgsMapCanvas

Returns the map canvas (can be None)

metric(self, QPaintDevice.PaintDeviceMetric) int
mouseDoubleClickEvent(self, QMouseEvent)
mouseMoveEvent(self, QMouseEvent)
mousePressEvent(self, QMouseEvent)
mouseReleaseEvent(self, QMouseEvent)
moveEvent(self, QMoveEvent)
nativeEvent(self, Union[QByteArray, bytes, bytearray], sip.voidptr) Tuple[bool, int]
paintEvent(self, QPaintEvent)
proxyModel(self) QSortFilterProxyModel

Returns the proxy model used to filter the results

Return type

QSortFilterProxyModel

receivers(self, PYQT_SIGNAL) int
resizeEvent(self, QResizeEvent)
sender(self) QObject
senderSignalIndex(self) int
setSql(self, index: QModelIndex)

This is called to define the SQL query and must be re-implemented. The implementation should call QgsAbstractDbTableModel.setSql

Parameters

index (QModelIndex) –

setupButtons(self, buttonBox: QDialogButtonBox)

Connect the ok and apply/add buttons to the slots

sharedPainter(self) QPainter
showEvent(self, QShowEvent)
tabletEvent(self, QTabletEvent)
timerEvent(self, QTimerEvent)
treeviewClicked(self, index: QModelIndex)
Parameters

index (QModelIndex) –

treeviewDoubleClicked(self, index: QModelIndex)
Parameters

index (QModelIndex) –

updateMicroFocus(self)
wheelEvent(self, QWheelEvent)
widgetMode(self) QgsProviderRegistry.WidgetMode

Returns the widget mode