Ejemplo n.º 1
0
Archivo: base.py Proyecto: Pyke75/ga
 def hide_tooltip_if_necessary(self, key):
     """Hide calltip when necessary"""
     try:
         calltip_char = self.get_character(self.calltip_position)
         before = self.is_cursor_before(self.calltip_position,
                                        char_offset=1)
         other = key in (Qt.Key_ParenRight, Qt.Key_Period, Qt.Key_Tab)
         if calltip_char not in ('?','(') or before or other:
             QToolTip.hideText()
     except (IndexError, TypeError):
         QToolTip.hideText()
Ejemplo n.º 2
0
Archivo: base.py Proyecto: jsantoul/ga
 def hide_tooltip_if_necessary(self, key):
     """Hide calltip when necessary"""
     try:
         calltip_char = self.get_character(self.calltip_position)
         before = self.is_cursor_before(self.calltip_position,
                                        char_offset=1)
         other = key in (Qt.Key_ParenRight, Qt.Key_Period, Qt.Key_Tab)
         if calltip_char not in ('?', '(') or before or other:
             QToolTip.hideText()
     except (IndexError, TypeError):
         QToolTip.hideText()