Looking at the online docs here:
Since qmlRegisterType is listed as related to QDeclarativeEngine it would seem logical to #include <QDeclarativeEngine> in order to be able to use the qmlRegisterType function. However, this is not the case. Instead, you must #include <qdeclarative.h>. This is not mentioned in the documentation. I actually had to grep the source code to figure this out!