1424 Protected method called when the editor loses focus. |
1424 Protected method called when the editor loses focus. |
1425 |
1425 |
1426 @param event event object (QFocusEvent) |
1426 @param event event object (QFocusEvent) |
1427 """ |
1427 """ |
1428 if self.isListActive(): |
1428 if self.isListActive(): |
1429 if event.reason() == Qt.ActiveWindowFocusReason: |
1429 if event.reason() in [ |
|
1430 Qt.ActiveWindowFocusReason, |
|
1431 Qt.OtherFocusReason |
|
1432 ]: |
1430 aw = QApplication.activeWindow() |
1433 aw = QApplication.activeWindow() |
1431 if aw is None or aw.parent() is not self: |
1434 if aw is None or aw.parent() is not self: |
1432 self.cancelList() |
1435 self.cancelList() |
1433 else: |
1436 else: |
1434 self.cancelList() |
1437 self.cancelList() |
1435 |
1438 |
1436 if self.isCallTipActive(): |
1439 if self.isCallTipActive(): |
1437 if event.reason() == Qt.ActiveWindowFocusReason: |
1440 if event.reason() in [ |
|
1441 Qt.ActiveWindowFocusReason, |
|
1442 Qt.OtherFocusReason |
|
1443 ]: |
1438 aw = QApplication.activeWindow() |
1444 aw = QApplication.activeWindow() |
1439 if aw is None or aw.parent() is not self: |
1445 if aw is None or aw.parent() is not self: |
1440 self.SendScintilla(QsciScintilla.SCI_CALLTIPCANCEL) |
1446 self.SendScintilla(QsciScintilla.SCI_CALLTIPCANCEL) |
1441 else: |
1447 else: |
1442 self.SendScintilla(QsciScintilla.SCI_CALLTIPCANCEL) |
1448 self.SendScintilla(QsciScintilla.SCI_CALLTIPCANCEL) |