def localizeShortcuts(widget):
    """
    Shifts all action shortcuts for the given widget to us the
    WidgetWithChildrenShortcut context, effectively localizing it to this
    widget.
    
    :param      widget | <QWidget>
    """
    import_qt(globals())
    
    for action in widget.findChildren(QtGui.QAction):
        action.setShortcutContext(QtCore.Qt.WidgetWithChildrenShortcut)
def localizeShortcuts ( widget ) : import_qt ( globals ( ) ) for action in widget . findChildren ( QtGui . QAction ) : action . setShortcutContext ( QtCore . Qt . WidgetWithChildrenShortcut )
Shifts all action shortcuts for the given widget to us the
    WidgetWithChildrenShortcut context, effectively localizing it to this
    widget.
    
    :param      widget | <QWidget>