QRenderSurfaceSelector Class

(Qt3DRender::QRenderSurfaceSelector)

Provides a way of specifying the render surface 更多...

头文件: #include <QRenderSurfaceSelector>
qmake: QT += 3drender
开始支持版本: Qt 5.7
Instantiated By: RenderSurfaceSelector
基类: Qt3DRender::QFrameGraphNode

属性

公有函数

QRenderSurfaceSelector(Qt3DCore::QNode *parent = nullptr)
QSize externalRenderTargetSize() const
QObject *surface() const
float surfacePixelRatio() const

公有槽函数

void setExternalRenderTargetSize(const QSize &size)
void setSurface(QObject *surfaceObject)
void setSurfacePixelRatio(float ratio)

信号

void externalRenderTargetSizeChanged(const QSize &size)
void surfaceChanged(QObject *surface)
void surfacePixelRatioChanged(float ratio)

其他继承的成员

详细描述

Provides a way of specifying the render surface

The Qt3DRender::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.

参见 QWindow, QOffscreenSurface, and QSurface.

属性

externalRenderTargetSize : QSize

Holds the size of the external render target.

访问函数:

QSize externalRenderTargetSize() const
void setExternalRenderTargetSize(const QSize &size)

Notifier signal:

void externalRenderTargetSizeChanged(const QSize &size)

surface : QObject *

Holds the surface

访问函数:

QObject *surface() const
void setSurface(QObject *surfaceObject)

Notifier signal:

void surfaceChanged(QObject *surface)

surfacePixelRatio : float

Holds the surfacePixelRatio of the surface.

访问函数:

float surfacePixelRatio() const
void setSurfacePixelRatio(float ratio)

Notifier signal:

void surfacePixelRatioChanged(float ratio)

成员函数

QRenderSurfaceSelector::QRenderSurfaceSelector(Qt3DCore::QNode *parent = nullptr)

Constructs QRenderSurfaceSelector with given parent.

[slot] void QRenderSurfaceSelector::setExternalRenderTargetSize(const QSize &size)

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

Note: Setter function for property externalRenderTargetSize.

参见 externalRenderTargetSize().

[slot] void QRenderSurfaceSelector::setSurface(QObject *surfaceObject)

Sets surfaceObject.

Note: Setter function for property surface.

参见 surface().