QML Namespaces | Qt Qml | Qt 6.11.2
Description: Description of QML Namespaces
Keywords: qmltopic

- Qt 6.11
- Qt Qml
- The QML Reference
- The QML Type System
- QML Namespaces
- Qt 6.11.2 Reference Documentation

QML Attached Types ◦ JavaScript Types

# QML Namespaces

A QML Namespace is a special kind of type that only exposes enumerations and cannot be instantiated. A namespace can only be declared in C++, using the QML_ELEMENT or QML_NAMED_ELEMENT macro inside a C++ namespace marked with Q_NAMESPACE.

QML namespaces can be used to extract enumerations from other types.

QML Attached Types ◦ JavaScript Types