Cannot queue arguments of type 'Mat' 信號傳送問題

在用多線程傳opencv的Mat時,報錯:

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

修改Connect,加一個屬性Qt::directConnection.
connect(thread1, SIGNAL(freshImg(const cv::Mat &)), this, SLOT(show_img(const cv::Mat &)),Qt::DirectConnection);

參考博客:https://blog.csdn.net/sinat_24206709/article/details/55209780

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章