Hello,

On Wed, Jun 15, 2016 at 7:00 PM, Igor Mironchik <igor.mironc...@gmail.com>
 wrote:
>
> Exactly. I need to Line be as parent of handles but they should be
> parented to the scene (read form in my app) because I need boundingRect()
> to return exactly bounding rectangle of the line without handles. An I need
> handles to be removed with the Line if Line deleted.
>

I didn't have time to check if the graphics view manages the children the
same way as QObject hierarchies, but there's the QEvent::ChildAdded and
QEvent::ChildRemoved events. If they're fired within the graphics items'
object tree you could intercept them and with a bit of fiddling ultimately
null your handle pointers in Line if Qt had deleted the handles.

Kind regards.
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to