title: Restrict movement area of QGraphicsItem inside of polygon area
body: <p>I am trying to limit the movement of QGraphicsItem inside of a parent object inherited from QGraphicsPathItem that has an arbitrary complex shape (not square).</p>
  <p>As I understand, I should extract each point of the moving object and check whether each of them is not contained in the parent QPainterPath. Then split the parent QPainterPath into small rectangle-shaped polygons and restrict movement area in the bounding box of each sub polygon.</p>
  <p>So, I would like to know if there are any other options to exist. Thanks.</p>