Provides a way of specifying the render surface. More...
Header: | #include <QRenderSurfaceSelector> |
CMake: | find_package(Qt6 COMPONENTS 3drender REQUIRED) target_link_libraries(mytarget PRIVATE Qt6::3drender) |
qmake: | QT += 3drender |
Since: | Qt 5.7 |
Instantiated By: | RenderSurfaceSelector |
Inherits: | 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) |
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.
See also QWindow, QOffscreenSurface, and QSurface.
Holds the size of the external render target.
Access functions:
QSize | externalRenderTargetSize() const |
void | setExternalRenderTargetSize(const QSize &size) |
Notifier signal:
void | externalRenderTargetSizeChanged(const QSize &size) |
Holds the surface
Access functions:
QObject * | surface() const |
void | setSurface(QObject *surfaceObject) |
Notifier signal:
void | surfaceChanged(QObject *surface) |
Holds the surfacePixelRatio of the surface.
Access functions:
float | surfacePixelRatio() const |
void | setSurfacePixelRatio(float ratio) |
Notifier signal:
void | surfacePixelRatioChanged(float ratio) |
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.
See also externalRenderTargetSize().
[slot]
void QRenderSurfaceSelector::setSurface(QObject *surfaceObject)
Sets surfaceObject.
Note: Setter function for property surface.
See also surface().
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.2/qt3drender-qrendersurfaceselector.html