Nesta página

Qt3DRender::QAbstractLight Class

class Qt3DRender::QAbstractLight

Incorpore um objeto `QAbstractLight` em uma cena ` Qt 3D `. Mais...

Cabeçalho: #include <qabstractlight.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
No QML: Light
Herdado de: Qt3DCore::QComponent
Herdado por:

Qt3DRender::QDirectionalLight, Qt3DRender::QPointLight e Qt3DRender::QSpotLight

Status: Obsoleta

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

Tipos públicos

enum Type { PointLight, DirectionalLight, SpotLight }

Propriedades

Funções públicas

QColor color() const
float intensity() const
Qt3DRender::QAbstractLight::Type type() const

Slots públicos

void setColor(const QColor &color)
void setIntensity(float intensity)

Sinais

void colorChanged(const QColor &color)
void intensityChanged(float intensity)

Descrição detalhada

Documentação sobre tipos de membros

enum QAbstractLight::Type

Identifica o tipo específico de luz.

ConstanteValor
Qt3DRender::QAbstractLight::PointLight0
Qt3DRender::QAbstractLight::DirectionalLight1
Qt3DRender::QAbstractLight::SpotLight2

Documentação da propriedade

color : QColor

Armazena a cor atual do ` QAbstractLight `.

Funções de acesso:

QColor color() const
void setColor(const QColor &color)

Sinal do Notifier:

void colorChanged(const QColor &color)

intensity : float

Armazena a intensidade atual do QAbstractLight.

Funções de acesso:

float intensity() const
void setIntensity(float intensity)

Sinal do notificador:

void intensityChanged(float intensity)

[read-only] type : Type

O tipo de luz.

Funções de acesso:

Qt3DRender::QAbstractLight::Type type() const

Documentação das funções de membro

Qt3DRender::QAbstractLight::Type QAbstractLight::type() const

Contém o tipo atual de ` QAbstractLight `.

Observação: Funçãogetter para a propriedade type.

© 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.