You were trying to add an image in background of QGraphicsView
Try to add background image of QGraphicsView, or QGraphicsScene.
try:
ui
->graphicsView
->setBackgroundBrush
(QBrush(*image
));
// set scene background transparent. ;)
ui->graphicsView->setBackgroundBrush(QBrush(*image));
// set scene background transparent. ;)
To copy to clipboard, switch view to plain text mode
OR
ui->graphicsView->fitInView(scn->sceneRect(), Qt::KeepAspectRatio);
ui->graphicsView->fitInView(scn->sceneRect(), Qt::KeepAspectRatio);
To copy to clipboard, switch view to plain text mode
ALL I CAN SE IS THE PROBLEM OF SCENE RECT.
Bookmarks