En esta página

Qt3DRender::QRenderSurfaceSelector Class

class Qt3DRender::QRenderSurfaceSelector

Permite especificar la superficie de renderizado. Más información...

Encabezado: #include <qrendersurfaceselector.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
En QML: RenderSurfaceSelector
Heredado de: Qt3DRender::QFrameGraphNode
Estado: Obsoleto

Esta clase está obsoleta. Se desaconseja encarecidamente su uso en código nuevo.

Propiedades

Funciones públicas

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

Ranuras públicas

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

Señales

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

Descripción detallada

La clase « Qt3DRender::QRenderSurfaceSelector » se puede utilizar para seleccionar la superficie en la que Qt3D representa el contenido. La superficie puede ser una superficie de ventana o una superficie fuera de pantalla. La clase « externalRenderTargetSize » se utiliza para especificar el tamaño real de la superficie cuando se utiliza una superficie fuera de pantalla.

Cuando el sistema utiliza el escalado de DPI, el tamaño lógico de la superficie —que se utiliza para los eventos del ratón— y el tamaño «físico» real de la superficie pueden diferir. El surfacePixelRatio es el factor que permite convertir el tamaño lógico al tamaño físico.

Véase también QWindow, QOffscreenSurface y QSurface.

Documentación de la propiedad

externalRenderTargetSize : QSize

Almacena el tamaño del destino de renderizado externo.

Funciones de acceso:

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

Señal de notificador:

void externalRenderTargetSizeChanged(const QSize &size)

surface : QObject*

Se adhiere a la superficie

Funciones de acceso:

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

Señal de notificador:

void surfaceChanged(QObject *surface)

surfacePixelRatio : float

Contiene el valor de `surfacePixelRatio` de la superficie.

Funciones de acceso:

float surfacePixelRatio() const
void setSurfacePixelRatio(float ratio)

Señal de notificador:

void surfacePixelRatioChanged(float ratio)

Documentación de las funciones de miembro

[explicit] QRenderSurfaceSelector::QRenderSurfaceSelector(Qt3DCore::QNode *parent = nullptr)

Crea un objeto `QRenderSurfaceSelector` con el ` parent` proporcionado.

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

Establece el tamaño del destino de renderizado size si es diferente del tamaño de la superficie subyacente. Indica el tamaño correcto para la selección.

Nota: Funciónde asignación para la propiedad externalRenderTargetSize.

Véase también externalRenderTargetSize().

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

Establece surfaceObject.

Nota: Funciónde asignación para la propiedad surface.

Véase también surface().

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.