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 | None

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

Return type:

Optional[QgsCameraController]

childEvent(self, a0: QChildEvent | None)
connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent | None)
disconnectNotify(self, signal: QMetaMethod)
event(self, a0: QEvent | None) bool
eventFilter(self, watched: QObject | None, event: QEvent | None) bool
Parameters:
  • watched (Optional[QObject])

  • event (Optional[QEvent])

Return type:

bool

exposeEvent(self, a0: QExposeEvent | None)
focusInEvent(self, a0: QFocusEvent | None)
focusOutEvent(self, a0: QFocusEvent | None)
hideEvent(self, a0: QHideEvent | None)
isSignalConnected(self, signal: QMetaMethod) bool
keyPressEvent(self, a0: QKeyEvent | None)
keyReleaseEvent(self, a0: QKeyEvent | None)
mapSettings(self) Qgs3DMapSettings | None

Returns access to the 3D scene configuration

Return type:

Optional[Qgs3DMapSettings]

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)
receivers(self, signal: PYQT_SIGNAL) int
resizeEvent(self, a0: QResizeEvent | None)

Resets the aspect ratio of the 3D window.

Parameters:

a0 (Optional[QResizeEvent])

scene(self) Qgs3DMapScene | None

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

Return type:

Optional[Qgs3DMapScene]

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

Manages the display events specified in e.

Parameters:

e (Optional[QShowEvent])

tabletEvent(self, a0: QTabletEvent | None)
timerEvent(self, a0: QTimerEvent | None)
touchEvent(self, a0: QTouchEvent | None)
wheelEvent(self, a0: QWheelEvent | None)