Add HintLabel.__repr__

This commit is contained in:
Florian Bruhin 2016-08-17 15:31:29 +02:00
parent 955ed2f52d
commit 52e47e0c3d

View File

@ -88,6 +88,13 @@ class HintLabel(QLabel):
self._move_to_elem()
self.show()
def __repr__(self):
try:
text = self.text()
except RuntimeError:
text = '<deleted>'
return utils.get_repr(self, elem=self.elem, text=text)
def update_text(self, matched, unmatched):
"""Set the text for the hint.