Пример #1
0
Файл: base.py Проект: 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()
Пример #2
0
 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()