Changeset 437a4f0708db…
Parent cd04e688e16b…
by
Changes to one file · Browse files at 437a4f0708db Showing diff from parent cd04e688e16b Diff from another changeset...
@@ -1051,6 +1051,12 @@ def eventFilter(self, obj, event):
if event.type() in (QEvent.Enter, QEvent.FocusIn):
self.desctext.setHtml(obj.toolTip())
+ elif event.type() in (QEvent.Leave, QEvent.FocusOut):
+ focus = QApplication.focusWidget()
+ if focus is not None and hasattr(focus, 'toolTip'):
+ self.desctext.setHtml(focus.toolTip())
+ else:
+ self.desctext.setHtml('')
if event.type() == QEvent.ToolTip:
return True # tooltip is shown in self.desctext
return False
|
Loading...