Qt doesn\'t allow to register class template?
My class hierarchy is
TreeItemTemplateBackend : public QObject
template
TreeItem :
You have to do two things:
Q_DECLARE_METATYPE( ClassName* ) for each template realisation. Pay an attention on asterisk (*) in the end! Since you need to expose pointer, not the value. For example Q_DECLARE_METATYPE( ClassName* ) . Look into documentation where to put this declaration the best (after class declaration out of all namespaces usually ). There are also issues with namespaces, so always use full qualified names here.qmlRegisterType(...) or qmlRegisterUncreatableType(...) if you need just expose some data with a property and not to instantiate it in QML. Here you don't need an asterisk, since you register not the pointer, but class itself.