Class: QgsNewDatabaseTableNameDialog¶
QgsNewDatabaseTableNameDialog
is a dialog which allows
selection of a DB schema and a new table name.
The table name is validated for uniqueness and the selected data item provider, schema and table names can be retrieved with getters.
Warning
The data provider that originated the data item provider must support the connections API
Added in version 3.14.
Class Hierarchy¶
Base classes¶
Methods
Returns the currently selected data item provider key |
|
Returns |
|
Returns the currently selected schema or file path (in case of filesystem-based DBs like spatialite or GPKG) for the new table |
|
Returns the current name of the new table |
|
Returns the (possibly blank) string representation of the new table data source URI. |
|
Returns the validation error or an empty string is the widget status is valid |
- class qgis.gui.QgsNewDatabaseTableNameDialog[source]¶
Bases:
QDialog
- __init__(browserModel: QgsBrowserGuiModel | None = None, providersFilter: Iterable[str | None] = [], parent: QWidget | None = None)
Constructs a new QgsNewDatabaseTableNameDialog
- Parameters:
browserModel (Optional[QgsBrowserGuiModel] = None) – an existing browser model (typically from app), if
None
an instance will be createdprovidersFilter (Iterable[Optional[str]] = []) – optional white list of data provider keys that should be shown in the widget, if not specified all providers data items with database capabilities will be shown
parent (Optional[QWidget] = None) – optional parent for this widget
- dataProviderKey(self) str [source]¶
Returns the currently selected data item provider key
- Return type:
str
- isValid(self) bool [source]¶
Returns
True
if the widget contains a valid new table name- Return type:
bool
- schema(self) str [source]¶
Returns the currently selected schema or file path (in case of filesystem-based DBs like spatialite or GPKG) for the new table
- Return type:
str