QObject::connect: Cannot queue arguments of type 'xxx&'(Make sure 'xxx&' is registered using qRegisterMetaType().)
-
what
xxxis??if you are using a custom type you have to register it to be used in MetaType system
-
To register a custom type you have to use
qRegisterMetaType(). You need to use it if you use QueuedConnection.Read here for more details
-
I too faced with same situation..
code:@{
connect(serial,SIGNAL(func(cv::String,cv::Mat,QTextStream&)),this,SLOT(func(cv::String,cv::Mat,QTextStream&)));
}@
Error:
Cannot queue arguments of type 'QTextstream&'I got same error for cv::string & cv::Mat but i resolved it using:
qRegisterMetaType< cv::Mat >("cv::Mat");
qRegisterMetaType< cv::String >("cv::String");
but am unable to fix it for QTextstream&
Would you please help me here? -
Actually there is no need for & in the connect() call. Just remove it.