QImage image1 = QImage((uchar*)pFrame1->imageData, pFrame1->width, pFrame1->height, QImage::Format_RGB888).rgbSwapped();
QImage result1 = image1.scaled(ui->NO1->height(),ui->NO1->width(),Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
ui->NO1->setPixmap(QPixmap::fromImage(result1));
里面的QImage::Format_RGB888.rgbSwapped()
Qt::IgnoreAspectRatio, Qt::SmoothTransformation
具体什么意思 详细一点 谢谢
不知道你这个问题是否已经解决, 如果还没有解决的话:QImage * frame = new QImage(buff,width,height,QImage::Format_RGB888);
注:width,height为设置QImage对象数据流的宽高,对应buff的宽高。