Qt5 之qRegisterMetaType

用信号传送 Mat 图像,报错

QObject::connect: Cannot queue arguments of type 'Mat'
(Make sure 'Mat' is registered using qRegisterMetaType().)

于是加入头文件和构造函数解决

#include <QMetaType>
    qRegisterMetaType<Mat>("Mat");

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.