Re: How to achieve showAll ?
Code:
fitInView(scene()->itemsBoundingRect(), Qt::KeepAspectRatio);
Re: How to achieve showAll ?
Quote:
Originally Posted by
wysota
Code:
fitInView(scene()->itemsBoundingRect(), Qt::KeepAspectRatio);
Thanks for the answer. But scene()->itemsBoundingRect() does the same thing I'm doing now (OR'ing sceneBoundingRects). Unfortunately I still experience above said problems. :confused:
Re: How to achieve showAll ?
Problem solved!!! :p
The problem was with the size of scene rect. The scene rect was smaller than the viewport rect. After setting this right, it works without any problem. :)
Re: How to achieve showAll ?
what exactly did you do? you made the scene size equal or greater than the view size?
Re: How to achieve showAll ?
Equal. Setting it larger will cause the view to add scrollbars.