title: Qt: modifying z-order between two non-sibling graphical items
body: <p>I have a <em>QGraphicsScene</em> where I'm inserting various <em>QGraphicsItem</em> objects like rectangles or polygons. The idea is to represent an electronic diagram with a <em>RectItem</em> for each component, a triangle-shaped <em>PolygonItem</em> for each pin of this component, and a <em>PathItem</em> to represent the links between the pins.</p>
  
  <p>I'm having a hard time figuring out a way to properly arranged my items so the links are always hiding by their start pin and end pin. It's easy to hide the link behind its start pin, because the start pin is always the parent of the link, and therefore I can set the flag <em>QGraphicsItem::ItemStacksBehindParent</em> when I create my link. But for the end pin, I'm stuck.</p>
  
  <p>I tried to set the Zvalue of my pin to a superior value of the link it is attached, or to call the Qt function <a href="http://qt-project.org/doc/qt-5.0/qtwidgets/qgraphicsitem.html#stackBefore" rel="nofollow">StackBefore()</a>, but without result. The doc tell me that the z-order concern only sibling items, that mean item that share the same parent or are both top-level items. But all my components are independant, so is there a way to change the stack order between two non-sibling items?</p>
  
  <p>Thank you very much for your help.</p>