Class: QgsNewVectorTableDialog

class qgis.gui.QgsNewVectorTableDialog

Bases: PyQt5.QtWidgets.QDialog

The QgsNewVectorTableDialog class is a provider-agnostic database vector and aspatial table designer dialog based on the connections API.

It allows designing a new vector or aspatial database table by defining the schema (if supported by the provider) and table name, the list of QgsFields, the optional geometry type and SRID.

The actual creation of the table is delegated to the connections API method QgsAbstractDatabaseProviderConnection.createVectorTable()

New in version 3.16.

QgsNewVectorTableDialog(conn: QgsAbstractDatabaseProviderConnection, parent: QWidget = None) QgsNewVectorTableDialog constructor

actionEvent(self, QActionEvent)
changeEvent(self, QEvent)
childEvent(self, QChildEvent)
closeEvent(self, QCloseEvent)
connectNotify(self, QMetaMethod)
contextMenuEvent(self, QContextMenuEvent)
create(self, window: PyQt5.sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
createSpatialIndex(self) bool

Returns True if spatialindex checkbox is cheched @return

Return type:


crs(self) QgsCoordinateReferenceSystem

Returns the CRS

Return type:


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
fields(self) QgsFields

Returns the fields

Return type:


focusInEvent(self, QFocusEvent)
focusNextChild(self) bool
focusNextPrevChild(self, bool) bool
focusOutEvent(self, QFocusEvent)
focusPreviousChild(self) bool
geometryColumnName(self) str

Returns the geometry column name

Return type:


geometryType(self) Qgis.WkbType

Returns the geometry type

Return type:


hideEvent(self, QHideEvent)
initPainter(self, QPainter)
inputMethodEvent(self, QInputMethodEvent)
isSignalConnected(self, QMetaMethod) bool
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
leaveEvent(self, QEvent)
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], PyQt5.sip.voidptr) Tuple[bool, int]
paintEvent(self, QPaintEvent)
receivers(self, PYQT_SIGNAL) int
resizeEvent(self, QResizeEvent)
schemaName(self) str

Returns the schema name

Return type:


sender(self) QObject
senderSignalIndex(self) int
setCrs(self, crs: QgsCoordinateReferenceSystem)

Sets the CRS to crs


crs (QgsCoordinateReferenceSystem) –

setFields(self, fields: QgsFields)

Sets the fields to fields


fields (QgsFields) –

setGeometryType(self, type: Qgis.WkbType)

Sets the geometry type


type (Qgis.WkbType) –

setSchemaName(self, name: str)

Sets the schema name


name (str) –

setTableName(self, name: str)

Sets the table name


name (str) –

sharedPainter(self) QPainter
showEvent(self, event: QShowEvent)

event (QShowEvent) –

tableName(self) str

Returns the table name

Return type:


tabletEvent(self, QTabletEvent)
timerEvent(self, QTimerEvent)
validationErrors(self) List[str]

Returns the validation errors or an empty list if the dialog is valid

Return type:


wheelEvent(self, QWheelEvent)