How to create a new signal and bind it to a slot in slicer3d?

Screenshot from 2020-10-13 19-57-03

When I am executing the above code slicer is exiting abnormally. How can I create a new signal in slicer that works fine?

2 posts were merged into an existing topic: How to use signals and slots in Slicer 3d?