ElidedLabel: If text is elided set full text as a tooltip

This commit is contained in:
Philipp Wolfer
2019-12-11 08:08:58 +01:00
parent 19f76b26f0
commit 0f6310b431

View File

@@ -47,6 +47,10 @@ class ElidedLabel(QtWidgets.QLabel):
QtCore.Qt.ElideRight,
self.width() - 2)
super().setText(elided_label)
if self._full_label and elided_label != self._full_label:
self.setToolTip(self._full_label)
else:
self.setToolTip("")
class ClickableSlider(QtWidgets.QSlider):