Qt3DRender.QRenderSurfaceSelector

Provides a way of specifying the render surface. More

Inheritance diagram of PySide2.Qt3DRender.Qt3DRender.QRenderSurfaceSelector

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.

class PySide2.Qt3DRender.Qt3DRender.QRenderSurfaceSelector([parent=None])
param parent

QNode

Constructs QRenderSurfaceSelector with given parent .

PySide2.Qt3DRender.Qt3DRender.QRenderSurfaceSelector.externalRenderTargetSize()
Return type

QSize

PySide2.Qt3DRender.Qt3DRender.QRenderSurfaceSelector.externalRenderTargetSizeChanged(size)
Parameters

sizeQSize

PySide2.Qt3DRender.Qt3DRender.QRenderSurfaceSelector.setExternalRenderTargetSize(size)
Parameters

sizeQSize

Sets render target size if different than underlying surface size. Tells picking the correct size.

PySide2.Qt3DRender.Qt3DRender.QRenderSurfaceSelector.setSurface(surfaceObject)
Parameters

surfaceObjectQObject

Sets surfaceObject .

See also

surface()

PySide2.Qt3DRender.Qt3DRender.QRenderSurfaceSelector.setSurfacePixelRatio(ratio)
Parameters

ratiofloat

PySide2.Qt3DRender.Qt3DRender.QRenderSurfaceSelector.surface()
Return type

QObject

See also

setSurface()

PySide2.Qt3DRender.Qt3DRender.QRenderSurfaceSelector.surfaceChanged(surface)
Parameters

surfaceQObject

PySide2.Qt3DRender.Qt3DRender.QRenderSurfaceSelector.surfacePixelRatio()
Return type

float

PySide2.Qt3DRender.Qt3DRender.QRenderSurfaceSelector.surfacePixelRatioChanged(ratio)
Parameters

ratiofloat