View Full Version : Adjustable QGraphicsView?

20th January 2010, 13:55
I'd love to realize something like:

when loading an image, no matter what size it is, I'm able to load it into a QGraphicsView, which is not of a fixed size.
Namely, I hope in my QMainWindow or QFrame or QDialog, this QGraphicsView is not of a fixed size, but a flexible and adjustable size, which will automatically adjust its size due to the loading image size.

Is it possible to realize this?

Best Regards

21st January 2010, 07:10
No matter how large you make the graphics view, if the image size is larger it wont fit in it.
You can have a look at QGraphicsView::fitInView if it suits you :)