Skip to content

Commit

Permalink
Merge pull request #489 from KDAB/fix-CallTipWidget-leak
Browse files Browse the repository at this point in the history
Destroy CallTipWidget when corresponding TextEdit is destroyed
  • Loading branch information
ccordoba12 committed Jul 3, 2021
2 parents 89ea72e + 90c9ac4 commit 012d137
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions qtconsole/call_tip_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def __init__(self, text_edit):
"""
assert isinstance(text_edit, (QtWidgets.QTextEdit, QtWidgets.QPlainTextEdit))
super().__init__(None, QtCore.Qt.ToolTip)
text_edit.destroyed.connect(lambda: self.deleteLater())

self._hide_timer = QtCore.QBasicTimer()
self._text_edit = text_edit
Expand Down

0 comments on commit 012d137

Please sign in to comment.