- Qt 5.15
- Qt 3D
- C++ Classes
- QNodeCommand
- Qt 5.15.11 Reference Documentation

# QNodeCommand Class

class Qt3DCore::QNodeCommand

The QNodeCommand class is the base class for all CommandRequested QSceneChange events. More...

Header: | #include <Qt3DCore/QNodeCommand>
qmake: | QT += 3dcore
Since: | Qt 5.10
Inherits: | Qt3DCore::QSceneChange

This class was introduced in Qt 5.10.

- List of all members, including inherited members

## Public Types

typedef | CommandId

## Public Functions

| QNodeCommand(QNodeId id)
CommandId | commandId() const
QVariant | data() const
CommandId | inReplyTo() const
QString | name() const
void | setData(const QVariant &data)
void | setName(const QString &name)
void | setReplyToCommandId(CommandId id)

## Related Non-Members

typedef | QNodeCommandPtr

## Detailed Description

The QNodeCommand class is the base class for all QSceneChange events that have the changeType() CommandRequested.

You can subclass this to create your own node update types for communication between your QNode and QBackendNode subclasses when writing your own aspects.

## Member Type Documentation

### typedef QNodeCommand::CommandId

Type of the command id, defined either as quint64 or quint32 depending on the platform support.

## Member Function Documentation

### QNodeCommand::QNodeCommand(QNodeId id)

Constructs a new QNodeCommand with id.

### CommandId QNodeCommand::commandId() const

Returns commandId.

### QVariant QNodeCommand::data() const

Returns data.

See also setData().

### CommandId QNodeCommand::inReplyTo() const

Returns the id of the original QNodeCommand message that was sent to the backend.

### QString QNodeCommand::name() const

Returns name.

See also setName().

### void QNodeCommand::setData(const QVariant &data)

Sets the data (data) in the backend node to perform the operations requested.

See also data().

### void QNodeCommand::setName(const QString &name)

Sets the data (name) in the backend node to perform the operations requested.

See also name().

### void QNodeCommand::setReplyToCommandId(CommandId id)

Sets the command id to which the message is a reply.

## Related Non-Members

### typedef QNodeCommandPtr

A shared pointer for QNodeCommand.