InterviewSolution
| 1. |
When Creating A New Signal, How Do I Define One Of The Signal Arguments As Python Data? |
|
Answer» When you add your signal using gobject.signal_new(), use gobject.TYPE_PYOBJECT as the type for the ARGUMENT being PASSED in: gobject.signal_new("signal", ClassName, And then you can emit the signal with PYTHON OBJECTS: mydict = {} And get them when you connect on the other SIDE: def signal_cb(instance, mydict): When you add your signal using gobject.signal_new(), use gobject.TYPE_PYOBJECT as the type for the argument being passed in: gobject.signal_new("signal", ClassName, And then you can emit the signal with Python objects: mydict = {} And get them when you connect on the other side: def signal_cb(instance, mydict): |
|