QQmlComponent
QQmlComponent is a class in the Qt QML framework that represents a QML component as loaded from a source and ready to be instantiated. It belongs to the QtQml module and is used to load, compile and create QML objects at runtime. A component can be created with a reference to a QQmlEngine or as a QObject, and it can load QML from a URL or from inline data. Source can be provided via setSource(QUrl) or setData(const QByteArray& data, bool isFromFile). The URL identifies the QML file, while the data string contains the QML code. The component maintains a status via the Status enum: Null, Loading, Ready, and Error. The errors() function returns a list of QQmlError objects that describe syntax or runtime issues encountered during loading or parsing.
Once the component is Ready, instances can be created by calling create(QQmlContext*) which returns a pointer
If the component references other JavaScript types or modules, the loader resolves them using the associated