QStateSet Class | Qt 3D 5.6

Qt 5.6 | Qt 3D | C++ Classes | QStateSet

Qt 5.6.0 Reference Documentation

# QStateSet Class

(Qt3DRender::QStateSet)

The QStateSet FrameGraph node offers a way of specifying a set of QRenderState objects to be applied during the execution of a framegraph branch. More...

Header: | #include <QStateSet>
qmake: | QT += 3drender
Since: | Qt 5.5
Inherits: | QFrameGraphNode

- List of all members, including inherited members

## Public Functions

| QStateSet(Qt3DCore::QNode *parent = 0)
| ~QStateSet()
void | addRenderState(QRenderState *state)
void | removeRenderState(QRenderState *state)
QList<QRenderState *> | renderStates() const

- 2 public functions inherited from Qt3DRender::QFrameGraphNode
- 6 public functions inherited from Qt3DCore::QNode
- 31 public functions inherited from QObject

## Protected Functions

| QStateSet(QStateSetPrivate &dd, Qt3DCore::QNode *parent = 0)
void | copy(const Qt3DCore::QNode *ref)

- 3 protected functions inherited from Qt3DCore::QNode
- 9 protected functions inherited from QObject

### Additional Inherited Members

- 1 property inherited from Qt3DRender::QFrameGraphNode
- 2 properties inherited from Qt3DCore::QNode
- 1 property inherited from QObject
- 1 public slot inherited from Qt3DRender::QFrameGraphNode
- 2 public slots inherited from Qt3DCore::QNode
- 1 public slot inherited from QObject
- 1 signal inherited from Qt3DRender::QFrameGraphNode
- 2 signals inherited from Qt3DCore::QNode
- 2 signals inherited from QObject
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 2 protected variables inherited from QObject
- 1 static protected member inherited from Qt3DCore::QNode

## Detailed Description

The QStateSet FrameGraph node offers a way of specifying a set of QRenderState objects to be applied during the execution of a framegraph branch.

States set on a QStateSet are set globally, contrary to the per-material states that can be set on a QRenderPass. By default, an empty QStateSet will result in all render states being disabled when executed. Adding a QRenderState state explicitly enables that render state at runtime.

See also QRenderState and QRenderPass.

## Member Function Documentation

### QStateSet::QStateSet(Qt3DCore::QNode *parent = 0)

### `[protected]` QStateSet::QStateSet(QStateSetPrivate &dd, Qt3DCore::QNode *parent = 0)

### QStateSet::~QStateSet()

### void QStateSet::addRenderState(QRenderState *state)

Adds a new QRenderState state to the QStateSet instance.

Note: Not setting any QRenderState state on a QStateSet instance implies all the render states will be disabled at render time.

### `[protected]` void QStateSet::copy(const Qt3DCore::QNode *ref)

### void QStateSet::removeRenderState(QRenderState *state)

Removes the QRenderState state from the QStateSet instance.

### QList<QRenderState *> QStateSet::renderStates() const

Returns the list of QRenderState objects that compose the QStateSet instance.