Class: QgsNewGeoPackageLayerDialog

class qgis.gui.QgsNewGeoPackageLayerDialog(parent: QWidget = None, fl: Union[Qt.WindowFlags, Qt.WindowType] = QgsGuiUtils.ModalDialogFlags)

Bases: PyQt5.QtWidgets.QDialog

Constructor

Dialog to set up parameters to create a new GeoPackage layer, and on accept() to create it and add it to the layers

Parameters
  • parent (QWidget = None) –

  • fl

AddNewLayer = 2
Overwrite = 1
class OverwriteBehavior

Bases: int

Prompt = 0
actionEvent()
changeEvent()
childEvent()
closeEvent()
connectNotify()
contextMenuEvent()
create()
customEvent()
databasePath(self) → str

Returns the database path

New in version 3.0.

Return type

str

destroy()
disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
enterEvent()
event()
eventFilter()
focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
hideEvent()
initPainter()
inputMethodEvent()
isSignalConnected()
keyPressEvent()
keyReleaseEvent()
leaveEvent()
lockDatabasePath(self)

Sets the database path widgets to a locked and read-only mode.

New in version 3.0.

metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
paintEvent()
receivers()
resizeEvent()
sender()
senderSignalIndex()
setAddToProject(self, addToProject: bool)

Sets whether a newly created layer should automatically be added to the current project. Defaults to True.

New in version 3.6.

Parameters

addToProject (bool) –

setCrs(self, crs: QgsCoordinateReferenceSystem)

Sets the crs value for the new layer in the dialog.

New in version 3.0.

Parameters

crs (QgsCoordinateReferenceSystem) –

setDatabasePath(self, path: str)

Sets the initial database path

New in version 3.0.

Parameters

path (str) –

setOverwriteBehavior(self, behavior: QgsNewGeoPackageLayerDialog.OverwriteBehavior)

Sets the behavior to use when a path to an existing geopackage file is used.

The default behavior is to prompt the user for an action to take.

New in version 3.0.

Parameters

behavior (QgsNewGeoPackageLayerDialog.OverwriteBehavior) –

sharedPainter()
showEvent()
tabletEvent()
timerEvent()
updateMicroFocus()
wheelEvent()