Scrolling in QGraphicsView
-
wrote on 11 Mar 2021, 03:39 last edited by damian28102000 3 Nov 2021, 03:40
Hi!
I would like to be able to scroll where the mouse is in QGraphicsView, something like this: https://youtu.be/4dq7n8S9AHw
Unfortunately, the solution presented on yt doesn't work in the newer version of qt (I'm using 6.0.1).I mean scroll in two directions where the mouse is now.
Anyone have an idea how to move a solution from yt to a newer version, or is able to present a better one?
-
wrote on 19 Mar 2021, 13:47 last edited by
set Transformation Anchor for Your QGraphicsView
QGraphicsview::setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
I am using same solution and it is working correctly.
-
Hi,
Please provide a minimal compilable example that shows the issue.
-
Hi!
I would like to be able to scroll where the mouse is in QGraphicsView, something like this: https://youtu.be/4dq7n8S9AHw
Unfortunately, the solution presented on yt doesn't work in the newer version of qt (I'm using 6.0.1).I mean scroll in two directions where the mouse is now.
Anyone have an idea how to move a solution from yt to a newer version, or is able to present a better one?
wrote on 11 Mar 2021, 23:45 last edited by@damian28102000 You already asked that in Polish part of the forum and I already explained that using Qt6 is sort of pointless atm due to many parts and modules still missing. I also advised you to roll back to Qt5, where you know it works.
-
wrote on 14 Mar 2021, 18:59 last edited by damian28102000
-
wrote on 19 Mar 2021, 13:47 last edited by
set Transformation Anchor for Your QGraphicsView
QGraphicsview::setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
I am using same solution and it is working correctly.