Class: QgsSublayersDialog

class qgis.gui.QgsSublayersDialog

Bases: PyQt5.QtWidgets.QDialog

Deprecated since version Will: be removed in QGIS 4.0

QgsSublayersDialog(providerType: QgsSublayersDialog.ProviderType, name: Optional[str], parent: Optional[QWidget] = None, fl: Union[Qt.WindowFlags, Qt.WindowType] = Qt.WindowFlags(), dataSourceUri: Optional[str] = ‘’) Construct a new QgsSublayersDialog object - a dialog to select which sub layers to be imported from a data source (e.g. from geopackage or zipfile)

Parameters:
  • providerType – provider type

  • name – provider type name

  • parent – parent widget of the dialog

  • fl – window flags

  • dataSourceUri – data source URI

Gdal = 1
class LayerDefinition
class LayerDefinition(a0: QgsSublayersDialog.LayerDefinition)

Bases: sip.wrapper

count
description
layerId
layerName
type
Mdal = 3
Ogr = 0
PromptAlways = 0
PromptIfNeeded = 1
PromptLoadAll = 3
class PromptMode

Bases: int

baseClass

alias of QgsSublayersDialog

PromptNever = 2
class ProviderType

Bases: int

Vsifile = 2
actionEvent(self, a0: QActionEvent | None)
addToGroupCheckbox(self) bool

If we should add layers in a group

Added in version 3.0.

Return type:

bool

changeEvent(self, a0: QEvent | None)
childEvent(self, a0: QChildEvent | None)
closeEvent(self, a0: QCloseEvent | None)
connectNotify(self, signal: QMetaMethod)
contextMenuEvent(self, a0: QContextMenuEvent | None)
countColumn(self) int

Returns column with count or -1

Added in version 3.0.

Return type:

int

create(self, window: PyQt5.sip.voidptr = None, initializeWindow: bool = True, destroyOldWindow: bool = True)
customEvent(self, a0: QEvent | None)
destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)
disconnectNotify(self, signal: QMetaMethod)
dragEnterEvent(self, a0: QDragEnterEvent | None)
dragLeaveEvent(self, a0: QDragLeaveEvent | None)
dragMoveEvent(self, a0: QDragMoveEvent | None)
dropEvent(self, a0: QDropEvent | None)
enterEvent(self, a0: QEvent | None)
event(self, a0: QEvent | None) bool
eventFilter(self, a0: QObject | None, a1: QEvent | None) bool
exec(self) int
Return type:

int

focusInEvent(self, a0: QFocusEvent | None)
focusNextChild(self) bool
focusNextPrevChild(self, next: bool) bool
focusOutEvent(self, a0: QFocusEvent | None)
focusPreviousChild(self) bool
hideEvent(self, a0: QHideEvent | None)
initPainter(self, painter: QPainter | None)
inputMethodEvent(self, a0: QInputMethodEvent | None)
isSignalConnected(self, signal: QMetaMethod) bool
keyPressEvent(self, a0: QKeyEvent | None)
keyReleaseEvent(self, a0: QKeyEvent | None)
leaveEvent(self, a0: QEvent | None)
metric(self, a0: QPaintDevice.PaintDeviceMetric) int
mouseDoubleClickEvent(self, a0: QMouseEvent | None)
mouseMoveEvent(self, a0: QMouseEvent | None)
mousePressEvent(self, a0: QMouseEvent | None)
mouseReleaseEvent(self, a0: QMouseEvent | None)
moveEvent(self, a0: QMoveEvent | None)
nativeEvent(self, eventType: QByteArray | bytes | bytearray, message: PyQt5.sip.voidptr | None)
paintEvent(self, a0: QPaintEvent | None)
populateLayerTable(self, list: Iterable[QgsSublayersDialog.LayerDefinition])

Populate the table with layers

Added in version 2.16.

Parameters:

list (Iterable[QgsSublayersDialog.LayerDefinition])

receivers(self, signal: PYQT_SIGNAL) int
resizeEvent(self, a0: QResizeEvent | None)
selection(self) List[QgsSublayersDialog.LayerDefinition]

Returns list of selected layers

Added in version 2.16.

Return type:

List[QgsSublayersDialog.LayerDefinition]

sender(self) QObject | None
senderSignalIndex(self) int
setShowAddToGroupCheckbox(self, showAddToGroupCheckbox: bool)

Set if we should display the add to group checkbox

Added in version 3.0.

Parameters:

showAddToGroupCheckbox (bool)

sharedPainter(self) QPainter | None
showAddToGroupCheckbox(self) bool

If we should display the add to group checkbox

Added in version 3.0.

Return type:

bool

showEvent(self, a0: QShowEvent | None)
tabletEvent(self, a0: QTabletEvent | None)
timerEvent(self, a0: QTimerEvent | None)
updateMicroFocus(self)
wheelEvent(self, a0: QWheelEvent | None)