| 34 | # changes and update the pane accordingly. |
| 35 | class HelloNotifications(UIContextNotification): |
| 36 | def __init__(self, widget): |
| 37 | UIContextNotification.__init__(self) |
| 38 | self.widget = widget |
| 39 | |
| 40 | # __del__ will not be called because the widget owns a reference to this object. Use |
| 41 | # QWidget.destroyed event to know when to stop listening for notifications. |
| 42 | self.widget.destroyed.connect(self.destroyed) |
| 43 | |
| 44 | UIContext.registerNotification(self) |
| 45 | |
| 46 | def destroyed(self): |
| 47 | UIContext.unregisterNotification(self) |