QRenderSurfaceSelector#

Provides a way of specifying the render surface. More

Synopsis#

Functions#

Slots#

Signals#

Detailed Description#

The QRenderSurfaceSelector can be used to select the surface, where Qt3D renders the content. The surface can either be window surface or offscreen surface. The externalRenderTargetSize is used to specify the actual size of the surface when offscreen surface is used.

When DPI scaling is used by the system, the logical surface size, which is used by mouse events, and the actual ‘physical’ size of the surface can differ. The surfacePixelRatio is the factor to convert the logical size to the physical size.

See also

QWindow QOffscreenSurface QSurface

class PySide6.Qt3DRender.Qt3DRender.QRenderSurfaceSelector([parent=None])#
Parameters

parentPySide6.Qt3DCore.Qt3DCore.QNode

Constructs QRenderSurfaceSelector with given parent.

PySide6.Qt3DRender.Qt3DRender.QRenderSurfaceSelector.externalRenderTargetSize()#
Return type

PySide6.QtCore.QSize

Holds the size of the external render target.

PySide6.Qt3DRender.Qt3DRender.QRenderSurfaceSelector.externalRenderTargetSizeChanged(size)#
Parameters

sizePySide6.QtCore.QSize

PySide6.Qt3DRender.Qt3DRender.QRenderSurfaceSelector.setExternalRenderTargetSize(size)#
Parameters

sizePySide6.QtCore.QSize

Holds the size of the external render target.

PySide6.Qt3DRender.Qt3DRender.QRenderSurfaceSelector.setSurface(surfaceObject)#
Parameters

surfaceObjectPySide6.QtCore.QObject

Holds the surface

PySide6.Qt3DRender.Qt3DRender.QRenderSurfaceSelector.setSurfacePixelRatio(ratio)#
Parameters

ratio – float

Holds the of the surface.

PySide6.Qt3DRender.Qt3DRender.QRenderSurfaceSelector.surface()#
Return type

PySide6.QtCore.QObject

Holds the surface

PySide6.Qt3DRender.Qt3DRender.QRenderSurfaceSelector.surfaceChanged(surface)#
Parameters

surfacePySide6.QtCore.QObject

PySide6.Qt3DRender.Qt3DRender.QRenderSurfaceSelector.surfacePixelRatio()#
Return type

float

Holds the of the surface.

PySide6.Qt3DRender.Qt3DRender.QRenderSurfaceSelector.surfacePixelRatioChanged(ratio)#
Parameters

ratio – float