1、QVariant使用OpenCV中的Mat
#include <QVariant>
#include "opencv.hpp"
Q_DECLARE_METATYPE(cv::Mat)
QVariant a;
a.setValue(cv::Mat());
qDebug() << a.type();
qDebug() << a.typeName();
Mat img = a.value<Mat>();
1、QVariant使用OpenCV中的Mat
#include <QVariant>
#include "opencv.hpp"
Q_DECLARE_METATYPE(cv::Mat)
QVariant a;
a.setValue(cv::Mat());
qDebug() << a.type();
qDebug() << a.typeName();
Mat img = a.value<Mat>();