Hello,I'm having the following problem with PyQtGraph0.9.10+PySide1.2.2+Python2.7. I'm getting a segmentation fault after remove a Parameter, add it back, and try change its value. This error happens in the valueChange method of the WidgetParameterItem class:
self.widget.sigChanged.disconnect(self.widgetValueChanged)
It seems that it is trying to disconnect a signal of a widget that doesn't exist anymore. If we call self.widget.show() in the line before, this exception is raised:
RuntimeError: Internal C++ object (SpinBox) already deleted.
I found out that despite the widget is being recreated in the second addChild call, for some reason it is being deleted in thereafter.
This is a code example that reproduces the problem I'm having:
from pyqtgraph.parametertree import Parameter
from pyqtgraph.Qt import QtGui
from pyqtgraph.parametertree import ParameterTree
app = QtGui.QApplication([])
t2 = ParameterTree()
t2.show()
root = Parameter.create(name='Root', type='group')
t2.addParameters(root)
par = Parameter.create(name='Par1', type='group')
par.addChildren([{'name':'test', 'type':'int', 'limits':(500, 2000000), 'value':38400}])
root.addChild(par)
par.remove()
root.addChild(par)
QtGui.QApplication.instance().exec_()
The reason I need to do it is because some of the parameters change dynamically during the execution and sometimes I need to remove and eventually add them back as a child of an existing Parameter.
Thank you in advance for any help.
Adriel