Hi, I create several circles and while dragging one of them I'd like it to snap to the position of the other. This works O'kay when scene is viewed with default zoom.
When I zoom out circles, do not change in size because they ignore transformations (apparently the increase in size with respect to the scene's coordinate system). Unfortunately, circle being moved snaps only when it is positioned tightly close to the very center of another one, but not when the mouse crosses its bounds. I believe that snapping feature is working, but the tolerance distance is scaled down to very small value. At first, I was finding the closest circle to mouse position and compared it to the radius of the circle. Then, I tried to use QGraphicsScene::items() to pick the list of circles under mouse, but with no luck. Contrary to this, items receive hover enter & leave events when needed. So QGraphicsScene is able to determine what I want. So, I decided to browse the sources and have digged down to QGraphicsSceneIndexPrivate::recursive_items_helper() which is unclear to me. Is there a convenient way to achive the goal? Regards, Dmitrii.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest