- Qt 6.9
- Qt 3D
- Qt3DCore::QAbstractAspect Proxy Page
- Qt 6.9.0 Reference Documentation

# Qt3DCore::QAbstractAspect Proxy Page

## Macros

| QT3D_REGISTER_ASPECT(name, AspectType)

## Macro Documentation

### QT3D_REGISTER_ASPECT(name, AspectType)

Convenience macro for registering AspectType for instantiation by the currently set Qt3DCore::QAspectFactory. This makes it possible to create an instance of AspectType in the aspect thread by later passing name to Qt3DCore::QAspectEngine::registerAspect(const QString &name).

Note: It is also possible to register a new aspect without using this macro by instead using Qt3DCore::QAspectEngine::registerAspect(QAbstractAspect *aspect) which will handle moving a previously created aspect instance to the aspect thread context.

KDAB has published a few articles about writing custom Qt3D aspects on their blog. These provide an excellent starting point if you wish to learn more about it.