En esta página

Qt3DRender::QAbstractLight Class

class Qt3DRender::QAbstractLight

Incluye un objeto `QAbstractLight` en una escena ` Qt 3D `. Más información...

Encabezado: #include <qabstractlight.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
En QML: Light
Heredado de: Qt3DCore::QComponent
Heredado por:

Qt3DRender::QDirectionalLight, Qt3DRender::QPointLight y Qt3DRender::QSpotLight

Estado: Obsoleto

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

Tipos públicos

enum Type { PointLight, DirectionalLight, SpotLight }

Propiedades

Funciones públicas

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

Ranuras públicas

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

Señales

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

Descripción detallada

Documentación sobre los tipos de miembros

enum QAbstractLight::Type

Identifica el tipo concreto de luz.

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

Documentación de la propiedad

color : QColor

Contiene el color actual de « QAbstractLight ».

Funciones de acceso:

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

Señal de notificación:

void colorChanged(const QColor &color)

intensity : float

Muestra la intensidad actual de « QAbstractLight ».

Funciones de acceso:

float intensity() const
void setIntensity(float intensity)

Señal del notificador:

void intensityChanged(float intensity)

[read-only] type : Type

El tipo de luz.

Funciones de acceso:

Qt3DRender::QAbstractLight::Type type() const

Documentación de las funciones miembro

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

Contiene el tipo actual de « QAbstractLight ».

Nota: Funcióngetter para la propiedad «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.