<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_to_toolbar(self, toolbar, widget):

 """Add widget actions to toolbar"""

        actions = widget.toolbar_actions
        if actions is not None:
            add_actions(toolbar, actions)