I have a question regarding the usage of signals with custom data
objects and not only "str" or "int".
Is it possible to define signals with custom data objects?
E.g.:
class Data(object):
...
class WidgetSource(QtGui.QWidget):
#signal_node_selected = QtCore.Signal(str)
signal_node_selected = QtCore.Signal(<DATA>)
...
class WidgetTarget(QtGui.QWidget):
def __init__(self):
s = WigdgetSource()
s. signal_node_selected.connect(self.slot_node_selected)
def slot_node_selected(self, data):
#process the data object
Thanks in advance and best regards!
Cheers,
David
_______________________________________________
PySide mailing list
PyS...@lists.pyside.org
http://lists.pyside.org/listinfo/pyside
Yes is possible to define sinal with python objects, you could use:
signal_node_selected = QtCore.Signal(object)
But this signal will be valid only in pyhon side, sice Qt/C++ does not
know how to handle PyObject.
BR
--
Renato Araujo Oliveira Filho
Instituto Nokia de Tecnologia - INdT
thanks! I only need this signal to be on the python side.
Cheers,
David