I don't know if this is a general question about views, and I am probably not going to explain this well... but I am trying to figure out how to keep movable graphic items from going outside the view (or is it the scene? so confused.)

In the Simple Anchor Layout example, under QGraphicsView, a QGraphicsWidget is created. If you move it around, you'll notice that scroll bars appear and that you can move the widget past the edge of the view. I want to stop this scrolling behavior -- No matter where I move it, I always want the *WHOLE* widget to be visible.

Is that a property of the QGraphicsView, QGraphicsScene, or QGraphicsWidget? Or some combination?



(Is there is a "general" case for this? Because I've wondered how to keep subwindows within the frame of the QMdiArea exposed when the application comes up too.)