I am creating photo editing tool using QGraphicsView. i can load image using

m_scene.addPixmap(QPixmap(m_strLoadImagePath));

then how I can save this image completely

I tried this code

QGraphicsView* view = new QGraphicsView(scene,this);
QString fileName = "file_name.png";
QPixmap pixMap = QPixmap::grabWidget(view);
pixMap.save(fileName);


But it is saving only the display portion of the image in graphicsView including the scrollbar . How I can save the image completely and without showing the QGrraphicsView objects scrollbars