'Update the elided text when necessary.
Args:
width: The maximal width the text should take.'

def _update_elided_text(self, width):

    if self.text():
        self._elided_text = self.fontMetrics().elidedText(self.text(), self._elidemode, width, Qt.TextShowMnemonic)
    else:
        self._elided_text = ''
