def eventFilter(self, obj, event):
    import MaxPlus
    if (event.type() == QEvent.WindowActivate):
        MaxPlus.CUI.DisableAccelerators()
    elif (event.type() == QEvent.WindowDeactivate):
        MaxPlus.CUI.EnableAccelerators()
    return False
def eventFilter(self, obj, event):
    import MaxPlus
    if (event.type() == QEvent.WindowActivate):
        MaxPlus.CUI.DisableAccelerators()
    elif (event.type() == QEvent.WindowDeactivate):
        MaxPlus.CUI.EnableAccelerators()
    return False