Important: Please read the Qt Code of Conduct -

Arbitrary transformation anchor in QGraphicsView

  • Hello,
    The task is that I have some GraphicsView and I need to scale and rotate it not around the center of the View or Scene or the mouse pointer, but around arbitrary point.
    For example, I have huge scene. With LeftButton click I place an anchor for transformation (a pin) to mouseEvent.scenePos(). And then, holding right mouse button and moving mouse I scale and rotate scene around that anchor, meaning pin staying still on the screen.
    That means I cant use setTransformationAnchor because it can acept only transformationAnchor enumeration.
    So how can I set transformation point?

Log in to reply