The issue can be reproduced with this patch: https://codereview.qt-project.org/c/qt/qtcoap/+/485107, which is an update of the Quick CoAP Multicast Discovery example (so if it's merged - just check the example).
Switching to the modern type registration, I use
to register the QtCoap namespace in QML.
This works fine with CMake, but qmake generates an incorrect *_qmltyperegistrations.cpp file. Specifically, it just tried to call
to register the namespace, which makes no sense.
Note: I'm using a developer build of Qt. The problem goes away if I use an installed version of Qt (tried with the 6.6.0 snapshot from the maintenance tool).