<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def register_widget_shortcuts(self, widget):
 """ Register widget shortcuts. Widget interface must have a method called 'get_shortcut_data' """

        for qshortcut, context, name in widget.get_shortcut_data():
            self.register_shortcut(qshortcut, context, name)