Class: QgsMapLayerConfigWidget

class qgis.gui.QgsMapLayerConfigWidget(layer: QgsMapLayer, canvas: QgsMapCanvas, parent: QWidget = None)

Bases: QgsPanelWidget

A panel widget that can be shown in the map style dock

  • layer (QgsMapLayer) – The layer active in the dock.

  • canvas (QgsMapCanvas) – The canvas object.

  • parent (QWidget = None) – The parent of the widget.


The widget is created each time the panel is selected in the dock. Keep the loading light as possible for speed in the UI.

A panel widget that can be shown in the map style dock

actionEvent(self, QActionEvent)

Called when changes to the layer need to be made. Will be called when live update is enabled.

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
focusInEvent(self, QFocusEvent)
focusNextChild(self) → bool
focusNextPrevChild(self, bool) → bool
focusOutEvent(self, QFocusEvent)
focusPreviousChild(self) → bool
hideEvent(self, QHideEvent)
initPainter(self, QPainter)
inputMethodEvent(self, QInputMethodEvent)
isSignalConnected(self, QMetaMethod) → bool
keyPressEvent(self, event: QKeyEvent)

Overridden key press event to handle the esc event on the widget.


event – The key event

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], sip.voidptr) → Tuple[bool, int]
paintEvent(self, QPaintEvent)
receivers(self, PYQT_SIGNAL) → int
resizeEvent(self, QResizeEvent)
sender(self) → QObject
senderSignalIndex(self) → int
sharedPainter(self) → QPainter
shouldTriggerLayerRepaint(self) → bool

Whether this config widget changes map layer properties in a way that triggerRepaint() should be called for the layer after applying changes. This is true by default, but some config widgets (for example 3D rendering config) do not need layer repaint as they do not modify 2D map rendering.

New in version 3.8.

Return type


showEvent(self, QShowEvent)
tabletEvent(self, QTabletEvent)
timerEvent(self, QTimerEvent)
wheelEvent(self, QWheelEvent)