Class: Qgs3DMapCanvas

class qgis._3d.Qgs3DMapCanvas

Bases: PyQt5.QtGui.QWindow

Qgs3DMapCanvas is a convenience wrapper to simplify the creation of a 3D window ready to be used with QGIS.

Note

This is a port of qtwindow3d which does not set the default surface when initialized.

Note

The default surface must be set before the construction of the QApplication when using shared OpenGL context.

Note

This is required in order to use QT3d and QtWebEngine at the same time.

Added in version 3.36.

Qgs3DMapCanvas() Constructor for Qgs3DMapCanvas.

Methods

cameraController

Returns access to the view's camera controller.

childEvent

connectNotify

customEvent

disconnectNotify

event

eventFilter

param watched:

exposeEvent

focusInEvent

focusOutEvent

hideEvent

isSignalConnected

keyPressEvent

keyReleaseEvent

mapSettings

Returns access to the 3D scene configuration

mouseDoubleClickEvent

mouseMoveEvent

mousePressEvent

mouseReleaseEvent

moveEvent

receivers

resizeEvent

Resets the aspect ratio of the 3D window.

scene

Returns access to the 3D scene (root 3D entity)

sender

senderSignalIndex

showEvent

Manages the display events specified in e.

tabletEvent

timerEvent

touchEvent

wheelEvent

cameraController(self) QgsCameraController

Returns access to the view’s camera controller. Returns None if the scene has not been initialized yet with setMapSettings()

Return type:

QgsCameraController

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
disconnectNotify(self, QMetaMethod)
event(self, QEvent) bool
eventFilter(self, watched: QObject, event: QEvent) bool
Parameters:
  • watched (QObject)

  • event (QEvent)

Return type:

bool

exposeEvent(self, QExposeEvent)
focusInEvent(self, QFocusEvent)
focusOutEvent(self, QFocusEvent)
hideEvent(self, QHideEvent)
isSignalConnected(self, QMetaMethod) bool
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
mapSettings(self) Qgs3DMapSettings

Returns access to the 3D scene configuration

Return type:

Qgs3DMapSettings

mouseDoubleClickEvent(self, QMouseEvent)
mouseMoveEvent(self, QMouseEvent)
mousePressEvent(self, QMouseEvent)
mouseReleaseEvent(self, QMouseEvent)
moveEvent(self, QMoveEvent)
receivers(self, PYQT_SIGNAL) int
resizeEvent(self, QResizeEvent)

Resets the aspect ratio of the 3D window.

scene(self) Qgs3DMapScene

Returns access to the 3D scene (root 3D entity)

Return type:

Qgs3DMapScene

sender(self) QObject
senderSignalIndex(self) int
showEvent(self, e: QShowEvent)

Manages the display events specified in e.

Parameters:

e (QShowEvent)

tabletEvent(self, QTabletEvent)
timerEvent(self, QTimerEvent)
touchEvent(self, QTouchEvent)
wheelEvent(self, QWheelEvent)