def hook_focus_events ( self ) : widget = self . widget widget . focusInEvent = self . focusInEvent widget . focusOutEvent = self . focusOutEvent
python bind focusin focusout
Install the hooks for focus events .
def hook_focus_events(self):
        """ Install the hooks for focus events.

        This method may be overridden by subclasses as needed.

        """
        widget = self.widget
        widget.focusInEvent = self.focusInEvent
        widget.focusOutEvent = self.focusOutEvent