QMaterial Class


Provides an abstract class that should be the base of all material component classes in a scene. More...


  • effect : Qt3DRender::QEffect *

Public Functions

QMaterial(Qt3DCore::QNode *parent = nullptr)
void addParameter(QParameter *parameter)
QEffect *effect() const
QVector<QParameter *> parameters() const
void removeParameter(QParameter *parameter)

Public Slots

void setEffect(QEffect *effect)


void effectChanged(QEffect *effect)

Protected Functions

QMaterial(QMaterialPrivate &dd, Qt3DCore::QNode *parent = nullptr)

Additional Inherited Members

  • 11 static public members inherited from QObject

Detailed Description

Provides an abstract class that should be the base of all material component classes in a scene.

QMaterial provides a way to specify the rendering of an entity. Any aspect can define its own subclass of QMaterial so that a Material can be used to describe a visual element; for example, the way sound should reflect off an element, the temperature of a surface, and so on.

See also QEffect.

Property Documentation

effect : Qt3DRender::QEffect *

Specifies the effect to be used with the material.

Access functions:

QEffect *effect() const
void setEffect(QEffect *effect)

Notifier signal:

void effectChanged(QEffect *effect)

Member Function Documentation

QMaterial::QMaterial(Qt3DCore::QNode *parent = nullptr)

Default constructs an instance of QMaterial.

[protected] QMaterial::QMaterial(QMaterialPrivate &dd, Qt3DCore::QNode *parent = nullptr)

Copy constructor.


Destroys the instance of QMaterial.

void QMaterial::addParameter(QParameter *parameter)

Add a parameter to the material's parameters.

QVector<QParameter *> QMaterial::parameters() const

Returns a vector of the material's current parameters

void QMaterial::removeParameter(QParameter *parameter)

Remove a parameter from the material's parameters.

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