ui->catchPhotoLabel_607->setPixmap(QPixmap::fromImage(*m_imageCatchtDefaultPhoto_607).scaled(QSize(200, 210), Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); ui->catchPhotoLabel_607->setScaledContents(true); //图片自适应大小
原文:https://www.cnblogs.com/huangfuyuan/p/11673087.html