Details
-
Suggestion
-
Resolution: Out of scope
-
P3: Somewhat important
-
3.x, 4.5.3
-
None
Description
I've placed some invisible items at the edges and corners of the scene rect. They serve as handles to control the size of the scene rect. Overall, this works very good, until I drag them to the border of the viewport. From my understanding, the following happens:
1. The mouse move event causes the handle to enlarge the scene rect.
2. QGraphicsView moves its viewport to accommodate the new scene rect.
3. Then it seems like QGraphicsView notices that the scene has moved under the mouse, and therefore a new mouse move event has to be fired.
4. Go back to step 1 until stack overflows.
Step 1 and 3 are desirable behavior, the problem IMO is in step 2. In my distinct use case, it would be best to disable the automatic viewport movement described by QGraphicsView::alignment. I've tried view->setAlignment(0), but that did not work.