When describing QML Elements in the MOC JSON, each class object contains metadata about its identity, location, and members.
Key fields include:
className: The C++ class name (e.g., MyClass).qualifiedClassName: The fully-qualified C++ name (e.g., MyNamespace::MyClass).lineNumber: The line number where the class is defined (used by qmlls for navigation).object: true if the type is an object, false if it is a gadget or namespace.gadget: true if the type is a gadget, false if it is an object or namespace.namespace: true if the type is a namespace.superClasses: A list of base types. Note that multiple superclasses are not supported; use the interfaces field for multiple inheritance.interfaces: A list of interface names implemented by the type (corresponds to Q_INTERFACES or QML_IMPLEMENTS_INTERFACES in C++).
Members include:
properties: A list of properties (see Property fields).enums: A list of enums (see Enum fields).methods, signals, slots, constructors: Lists of functional members (all share similar field structures).
{
"classInfos": [
{
"name": "QML.Element",
"value": "myGadget"
}
],
"className": "MyGadget",
"gadget": true,
"lineNumber": 6,
"properties": [
{
"constant": false,
"designable": true,
"final": false,
"index": 0,
"lineNumber": 10,
"member": "m_myInt",
"name": "myInt",
"required": false,
"scriptable": true,
"stored": true,
"type": "int",
"user": false
}
],
"qualifiedClassName": "MyGadget"
}