S
S
sergosar2020-08-12 07:16:07
Qt
sergosar, 2020-08-12 07:16:07

How to make QGraphicsScene not move?

Good people, tell me, when drawing on QGraphicsScene (QGraphicsView), the center of the scene moves in some way in accordance with the drawn element. I would like the initial center of the scene (coordinates 0,0) to remain stationary relative to the QGraphicsView widget when drawing. In English, not very good. strong, tried to find in the documentation but could not.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
Jacob E, 2020-08-12
@Zifix

I don't have much experience with the scene, but try explicitly sizing it with setSceneRect

K
Konstantin Kitmanov, 2015-03-26
@Vladisus

Almost.
jsfiddle.net/q0xn0fkr
PS Sorry for the broken link.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question