En esta página

Qt3DRender::QRenderSurfaceSelector Class

class Qt3DRender::QRenderSurfaceSelector

Proporciona una forma de especificar la superficie de renderizado. Más...

Cabecera: #include <QRenderSurfaceSelector>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
En QML: RenderSurfaceSelector
Hereda: Qt3DRender::QFrameGraphNode
Status: Obsoleto

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

El Qt3DRender::QRenderSurfaceSelector se puede utilizar para seleccionar la superficie, donde Qt3D renderiza el contenido. La superficie puede ser una superficie de ventana o una superficie fuera de pantalla. El externalRenderTargetSize se utiliza para especificar el tamaño real de la superficie cuando se utiliza la superficie fuera de pantalla.

Cuando el sistema utiliza el escalado DPI, el tamaño lógico de la superficie, que es utilizado por los eventos del ratón, y el tamaño "físico" real de la superficie pueden diferir. surfacePixelRatio es el factor para convertir el tamaño lógico en tamaño físico.

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

Documentación de propiedades

externalRenderTargetSize : QSize

Mantiene el tamaño del objetivo de render externo.

Funciones de acceso:

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

Señal del notificador:

void externalRenderTargetSizeChanged(const QSize &size)

surface : QObject*

Sujeta la superficie

Funciones de acceso:

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

Señal de aviso:

void surfaceChanged(QObject *surface)

surfacePixelRatio : float

Mantiene el surfacePixelRatio de la superficie.

Funciones de acceso:

float surfacePixelRatio() const
void setSurfacePixelRatio(float ratio)

Señal notificadora:

void surfacePixelRatioChanged(float ratio)

Documentación de la función miembro

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

Construye QRenderSurfaceSelector con la dirección parent.

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

Establece el objetivo de renderizado size si es diferente del tamaño de la superficie subyacente. Indica el tamaño correcto.

Nota: Función Setter para la propiedad externalRenderTargetSize.

Ver también externalRenderTargetSize().

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

Establece surfaceObject.

Nota: Función Setter 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.