Extended the QScintilla focusOutEvent to remove calltip widgets as well. 5_4_x

Sat, 01 Feb 2014 18:41:02 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 01 Feb 2014 18:41:02 +0100
branch
5_4_x
changeset 3258
a2bec950a859
parent 3254
27c2b183eca7
child 3262
fffe2df45766

Extended the QScintilla focusOutEvent to remove calltip widgets as well.
(grafted from a2b4a45e14de794750f17409b797c782c59f9d90)

QScintilla/QsciScintillaCompat.py file | annotate | diff | comparison | revisions
--- a/QScintilla/QsciScintillaCompat.py	Sat Feb 01 17:02:47 2014 +0100
+++ b/QScintilla/QsciScintillaCompat.py	Sat Feb 01 18:41:02 2014 +0100
@@ -1188,6 +1188,14 @@
             else:
                 self.cancelList()
         
+        if self.isCallTipActive():
+            if event.reason() == Qt.ActiveWindowFocusReason:
+                aw = QApplication.activeWindow()
+                if aw is None or aw.parent() is not self:
+                    self.SendScintilla(QsciScintilla.SCI_CALLTIPCANCEL)
+            else:
+                self.SendScintilla(QsciScintilla.SCI_CALLTIPCANCEL)
+        
         super().focusOutEvent(event)
     
     def event(self, evt):

eric ide

mercurial