On Dec 12, 12:54 pm, john haddon <[email protected]> wrote: > The behaviour I would > expect to see is that no button appears on the screen, but if I call > the parent() method on the button to query the parent before > unparenting, the button remains onscreen in it's own window - it > hasn't been destroyed despite having no owner in either python or c++.
I spent a bit more time looking at this and discovered that if I query parent() again after calling setParent( None ) then the expected behaviour reappears. Looking in typesystem_core.xml at line 1157 I see some stuff which looks like it might manipulate the ownership of the objects involved - am I right in thinking that? I see that the markup for parentWidget() also includes the same statements, but if I replace the call to parent() with one to parentWidget() then the problem doesn't occur. I don't know anything about the inner workings of the bindings but it seems odd that a method which queries ownership should also modify it. Could anyone shed some light on this? Is calling parent() after any setParent( None ) calls a reliable approach? Cheers... John _______________________________________________ PySide mailing list [email protected] http://lists.openbossa.org/listinfo/pyside
