hi:
i use following code to display my picture:
QPixmap *pm = new QPixmap(picPath);
QGraphicsScene *gs = new QGraphicsScene();
gs->addPixmap(*pm);
ui.graphicsView.setScene(gs);
the picture is displayed in the center of graphicsview by default,
but,when i load bigger one into the graphicsview,and then load a smaller one again, the smaller one will display in the top-left coordinate, here are some snapshots:
first:
load big one:
load small again:
i have set fixinview(0,0,320,240); and the scrollbar is gone, the big ones display well, but the small ones.....
Bookmarks