The closest thing I can think of (without changing the types themselves) is to use qmlEngine() :
if (qmlEngine(root)) { return; }
However, this will return true for any type created in QML.
To define only your C ++ types, you can specify their prefix type name (for example, QmlService ):
if (QString(root->metaObject()->className()).contains("Qml")) { return; }
Although, if you can do this, Iβm not sure why you simply wonβt keep track of which types you are registering in the list or something else, and refer to it later. If you clarify a little what you are trying to achieve, perhaps we can find the best solutions.
Mitch source share