Scrolling in QGraphicsView
-
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?
-
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.
-
@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.
-
I mean scroll in two directions where the mouse is now
When I have the mouse on the red point I would like the x and y axes to get closer to exactly that point.
Now you understand me? (sorry for the response time :( )a bit like a "magnifier" in paint but on the mouse scroll
-
set Transformation Anchor for Your QGraphicsView
QGraphicsview::setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
I am using same solution and it is working correctly.