图像没有被绘制到屏幕上?
QGraphicsScene *scene = new QGraphicsScene();
scene->setSceneRect(0, 0, 996, 996);
scene->setItemIndexMethod(QGraphicsScene::NoIndex);
QGraphicsView *view = new QGraphicsView();
view->setScene(scene);
view->setRenderHint(QPainter::Antialiasing);
view->setBackgroundBrush(Qt::white);
view->setCacheMode(QGraphicsView::CacheBackground);
view->setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
view->setDragMode(QGraphicsView::ScrollHandDrag);
view->setWindowTitle(QT_TRANSLATE_NOOP(QGraphicsView, "Colliding Mice"));
view->resize(1000, 1000);
view->show();
QImage img(996, 996, QImage::Format_ARGB32);
img.load("/home/blabla/scene8.jpg", 0);
QPainter painter(&img);
view->render(&painter, view->sceneRect());