在QT界面如何显示While循环中的多帧图片

我用OpenCV读取码流做处理。然后原先是在一个While循环中利用show函数显示多帧图片,
现在我是想把多帧图片显示在QT UI上的Label中,不知道应该如何操作??

http://www.cnblogs.com/qiaozhoulin/p/4509938.html

为什么不用python去实现呢。pyqt5

详细代码太多了,下面给个关键示例代码:
if(!m_cam.grab() ) //cv::VideoCapture m_cam;
return ; //根据你的情况处理
m_cam >> m_frame; //cv::Mat m_frame;
//算法处理m_frame
QImage img1 = QImage((const unsigned char*)m_frame.data, m_frame.cols, m_frame.rows, QImage::Format_RGB888).rgbSwapped();
ui->label->setPixmap(QPixmap::fromImage(img1));