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
Returns access to the view's camera controller.
- param watched:
Returns access to the 3D scene configuration
Resets the aspect ratio of the 3D window.
Returns access to the 3D scene (root 3D entity)
Manages the display events specified in e.
- cameraController(self) QgsCameraController ¶
Returns access to the view’s camera controller. Returns
None
if the scene has not been initialized yet withsetMapSettings()
- Return type:
- 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:
- 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:
- 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)¶