I'm using QGraphicsView QGraphicsScene to display an image. The code looks like

QPixmap pixmap = QPixmap::fromImage(*myQImage);
QPixmap scaledPixmap = pixmap.scaled(scale, Qt::KeepAspectRatio, Qt::SmoothTransformation);
QGraphicsScene *s = ui->graphicsView->scene();
s->clear();
s->addPixmap(scaledPixmap);

To increase the (QSize) scale from 1, no problem. But when I decease the scale, for example from 5 to 1, then there will be two white boards on the right and down sides of the graphicsView. It seems that the graphicsScene doesn't shrinking.

Is there any command to do a "clean" or "reset" of the graphicsView or the graphicsScene or the similar?

Thank you very much in advance!