def qteActiveWindow(self):
        """
        Return the currently active ``QtmacsWindow`` object.

        If no Qtmacs window is currently active (for instance because
        the user is working with another application at the moment)
        then the method returns the first window in the window list.

        The method only returns **None** if the window list is empty,
        which is definitively a bug.

        |Args|

        * **None**

        |Returns|

        * **QtmacsWindow**: the currently active window or **None** if
          no window is currently active.

        |Raises|

        * **None**
        """
        if len(self._qteWindowList) == 0:
            self.qteLogger.critical('The window list is empty.')
            return None
        elif len(self._qteWindowList) == 1:
            return self._qteWindowList[0]
        else:
            # Find the active window.
            for win in self._qteWindowList:
                if win.isActiveWindow():
                    return win

        # Return the first window if none is active.
        return self._qteWindowList[0]
def qteActiveWindow ( self ) : if len ( self . _qteWindowList ) == 0 : self . qteLogger . critical ( 'The window list is empty.' ) return None elif len ( self . _qteWindowList ) == 1 : return self . _qteWindowList [ 0 ] else : for win in self . _qteWindowList : if win . isActiveWindow ( ) : return win return self . _qteWindowList [ 0 ]
Return the currently active ``QtmacsWindow`` object.

        If no Qtmacs window is currently active (for instance because
        the user is working with another application at the moment)
        then the method returns the first window in the window list.

        The method only returns **None** if the window list is empty,
        which is definitively a bug.

        |Args|

        * **None**

        |Returns|

        * **QtmacsWindow**: the currently active window or **None** if
          no window is currently active.

        |Raises|

        * **None**