[Qt-interest] Graphics scene - view problem
Ben Swerts
benswerts at telenet.be
Tue Feb 17 22:02:38 CET 2009
Hi Ankit,
That's a problem that's been in the tasktracker for ages but without a
solution. The first call to fitInView will fit the scene in the exposed area
(excluding the scrollbar). Then the QGraphicsView realizes it doesn't need
the scrollbar anymore leaving you with an empty space. The second call to
fitInView fixes this.
You can check out the task tracker entries 148174 and 176805.
Greets,
Ben
> Hi,
> We have a view that contains a scene. The sceneRect is larger than the
> view's rect. Now i want to fit the scene in the view. I tried this by
> using fitToView() function but when using this function, i need to
> manually call this function (on button press event) twice to fit the scene
> perfectly in the view.
> Please help!!! Am I missing on some point here?
>
> --
> Regards,
> Ankit Agarwal
More information about the Qt-interest-old
mailing list