Given a QGraphicScene and a QGraphicView how can I write a jpg file from that?
qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
QGraphicsScene *scene = new QGraphicsScene();
scene->setSceneRect(-300, -300, 600, 600);
scene->setItemIndexMethod(QGraphicsScene::NoIndex);
qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
myPlot *myplot = new myPlot;
scene->addItem(myplot);
QGraphicsView *view = new QGraphicsView();
view->setScene(scene);
view->setRenderHint(QPainter::Antialiasing);
view->setBackgroundBrush(Qt::yellow);
view->setCacheMode(QGraphicsView::CacheBackground);
view->setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
view->setDragMode(QGraphicsView::ScrollHandDrag);
view->setWindowTitle(QT_TRANSLATE_NOOP(QGraphicsView, "Colliding Mice"));
view->resize(1000, 800);
view->show();