On 25/03/14 01:25, j verzani wrote:
I don't really know. This of course is an issue, as it likely won't get
garbage collected once removed. I thought setting the parent to
`nothing` would work, but it doesn't. If you find something that does
work please let me know.

thanks, setting the parent to `nothing' (as opposed to `None`) does seem to work in the sense that I don't get an error message, and the GUI seems to be behaving properly (no floating widgets or other issues so far), although I don't know what's happening under the hood.

Sam


On Monday, March 24, 2014 9:00:13 PM UTC-4, Samuele Carcagno wrote:

    another PySide.jl question, how to set the parent to None
    after removing a widget? If I attempt it I get the following error:

    julia> pw_prm_sizer_0[:removeWidget](wd["fieldLabel"][1])

    julia> wd["fieldLabel"][1][:setParent](None)
    ERROR: PyError (PyObject_Call) <type 'exceptions.TypeError'>
    TypeError("'PySide.QtGui.QWidget.setParent' called with wrong argument
    types:\n  PySide.QtGui.QWidget.setParent(PyCall.jlwrap)\nSupported
    signatures:\n  PySide.QtGui.QWidget.setParent(PySide.QtGui.QWidget)\n
    PySide.QtGui.QWidget.setParent(PySide.QtGui.QWidget,
    PySide.QtCore.Qt.WindowFlags)",)

       in pyerr_check at /home/sam/.julia/v0.3/PyCall/src/exception.jl:58
       in pycall at /home/sam/.julia/v0.3/PyCall/src/PyCall.jl:85
       in fn at /home/sam/.julia/v0.3/PyCall/src/conversions.jl:181


Reply via email to