Qt World Summit: Register Today!

Graphics Item parenting bug, works on Node but not on Arrow labels... 😬

  • https://www.youtube.com/watch?v=Mxp_gJRRGcI&feature=youtu.be

    Here's the video. When I add a fresh node, clearly the label is not part of the node's bounding rect.

    Then when I add a child node to the parent node, the child node's labels are still not effecting the parent bounding rect (desired).

    But as you can see when I finally add an arrow, the whole design messes up, and the child -> Label -> TextItem -> ProxyWidget(plain text edit that you can see) hierarchy is such that the Label / TextItem boung rects are effecting the parent node's bounding rect.

    I've added in if conditions / filters where appropriate. Other than checking the computed bouding rects (making sure they don't include certain children) is there anything else I should check or a flag I should be aware of to make things easier?


  • The solution was to not include the arrows in the parent node's bounding rect computation. But arrows can now go "out of the box" but it's not a problem.

Log in to reply