QLabel加载图片
//在对应的控件中显示图片
void qm_img::DisplayImg(cv::Mat imgParam, QLabel *labelParam)
{
if (!imgParam.empty())
{
cv::Mat img_index1 = imgParam.clone();
//cvtColor(img_index1, img_index1, cv::COLOR_BGR2RGB);
QImage qimg1 = Mat2QImage(img_index1);
labelParam->clear();
//labelParam->setScaledContents(true);
labelParam->setPixmap(QPixmap::fromImage(qimg1));
//labelParam->resize(labelParam->pixmap()->size());
labelParam->show();
}
}