程序开头:
#include "mainwindow.h"#include "ui_mainwindow.h"#include <QImage>#include <QDebug>#include <QKeyEvent>
程序59行:QImage image = QImage((co nst uchar*)frame->imageData,frame->width,frame->height,QImage::Format_RGB888).rgbSwapped();
程序88行:ui->label->setPixmap(QPixmap::fromImage(image));