Assume that class Parent exists in QML module A, and has a revisioned property revProp.
If class Child in module B derives from Parent, the revisioned property is inaccessible in its instances in QML, no matter which version of B gets imported.
The reason for this is that when looking for the QML type corresponding to Parent's metaobject in QQmlMetaType::qmlType, we won't accept the the version from module A (as t.availableInVersion(module, version) will only accept the type if it is found in B).
Using qmlRegisterAnonymousType, the type can be made available in module B, too. However, that method registers the type in revision 0. Consequently,
QQmlMetaTypeData::propertyCache will not call setAllowedRevision with the correct revision, and revProp is still unavailable.
Using QML_ANONYMOUS + QML_FOREIGN remedies the issue, but requires some manual work. The correct solution is most likely that qmltyperegistrar checks whether parent exists in the current module, and generates the QML_ANONYMOUS automatically if it is not.