Nesta página

Qt3DRender::QRenderSurfaceSelector Class

class Qt3DRender::QRenderSurfaceSelector

Oferece uma maneira de especificar a superfície de renderização. Saiba mais...

Cabeçalho: #include <qrendersurfaceselector.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
No QML: RenderSurfaceSelector
Herdado de: Qt3DRender::QFrameGraphNode
Status: Obsoleta

Esta classe está obsoleta. Recomendamos enfaticamente que não seja utilizada em código novo.

Propriedades

Funções públicas

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

Slots públicos

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

Sinais

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

Descrição detalhada

O ` Qt3DRender::QRenderSurfaceSelector ` pode ser usado para selecionar a superfície na qual o Qt3D renderiza o conteúdo. A superfície pode ser uma superfície de janela ou uma superfície fora da tela. O ` externalRenderTargetSize ` é usado para especificar o tamanho real da superfície quando uma superfície fora da tela é utilizada.

Quando o sistema utiliza o redimensionamento por DPI, o tamanho lógico da superfície — utilizado pelos eventos do mouse — e o tamanho “físico” real da superfície podem diferir. O ` surfacePixelRatio ` é o fator de conversão do tamanho lógico para o tamanho físico.

Consulte também QWindow, QOffscreenSurface e QSurface.

Documentação da propriedade

externalRenderTargetSize : QSize

Armazena o tamanho do destino de renderização externo.

Funções de acesso:

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

Sinal do Notifier:

void externalRenderTargetSizeChanged(const QSize &size)

surface : QObject*

Aderem à superfície

Funções de acesso:

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

Sinal do notificador:

void surfaceChanged(QObject *surface)

surfacePixelRatio : float

Armazena o valor de surfacePixelRatio da superfície.

Funções de acesso:

float surfacePixelRatio() const
void setSurfacePixelRatio(float ratio)

Sinal do Notifier:

void surfacePixelRatioChanged(float ratio)

Documentação das funções de membro

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

Cria um objeto `QRenderSurfaceSelector` com o ` parent` fornecido.

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

Define o alvo de renderização size caso seja diferente do tamanho da superfície subjacente. Indica o tamanho correto para a seleção.

Observação: Funçãode definição para a propriedade externalRenderTargetSize.

Veja também externalRenderTargetSize().

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

Define surfaceObject.

Observação: Funçãode definição para a propriedade surface.

Veja também 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.