'Extend QLabel::setText.
This update the elided text after setting the text, and also works
around a weird QLabel redrawing bug where it doesn\'t redraw correctly
when the text is empty -- we explicitly need to call repaint() to
resolve this.
More info:
http://stackoverflow.com/q/21890462/2085149
https://bugreports.qt.io/browse/QTBUG-36945
https://codereview.qt-project.org/#/c/79181/
Args:
txt: The text to set (string).'

def setText(self, txt):

    super().setText(txt)
    self._update_elided_text(self.geometry().width())
    if (not txt):
        self.repaint()
