Expanding a bit on top of the @Pavel Strakhov's answer, inspired by @kevinarpe's comment.
The name of the metatype registered using qRegisterMetaType
must EXACTLY match
the signature of the signal (including all namespaces etc.)
It may be a bit cumbersome or surprising when dealing with nested classes:
struct XyzService
{
struct Result {};
signals:
void signalDoWork(const Result&);
};
in this case, the matching registration would be:
qRegisterMetaType<XyzService::Result>("Result")
If you would like to be overly explicit, you may give the signal signature a fully qualified name, then it becomes:
struct XyzService
{
struct Result {};
signals:
void signalDoWork(const XyzService::Result&);
};
and the corresponding registartion:
qRegisterMetaType<XyzService::Result>("XyzService::Result")
works without warnings.