PDA

View Full Version : Disable QGraphicsScene autoscale



PinTxO
11th October 2017, 15:21
Hi guys.

I have a scene where I paint a series of items using a drag-and-drop process. What I want to do is to place the item where I loose it, do not auto-scale it. What happens to me is that if for example, having the scene empty, I drag an item and release it very close to the right side of the scene, it puts me in the middle and that's not what I want. What I want is to put it where I let it go and if the item does not enter the horizontal axis the horizontal scroll appears so that the user can see it.

Thank you.

d_stranz
22nd October 2017, 20:26
The scaling you are seeing is a feature of the QGraphicsView, not the scene (unless you are applying a transformation to the scene). Be sure you are not calling some view method that affects the viewport or other property that would affect which part of the scene is displayed in the view.