--- a/eric6/Snapshot/SnapshotTimer.py Wed Jan 08 18:57:10 2020 +0100 +++ b/eric6/Snapshot/SnapshotTimer.py Wed Jan 08 18:58:31 2020 +0100 @@ -39,10 +39,13 @@ self.__toggle = True # text is taken from paintEvent with maximum number plus some margin - self.resize( - self.fontMetrics().width(self.tr( - "Snapshot will be taken in %n seconds", "", 99)) + 6, - self.fontMetrics().height() + 4) + try: + fmWidth = self.fontMetrics().horizontalAdvance(self.tr( + "Snapshot will be taken in %n seconds", "", 99)) + except AttributeError: + fmWidth = self.fontMetrics().width(self.tr( + "Snapshot will be taken in %n seconds", "", 99)) + self.resize(fmWidth + 6, self.fontMetrics().height() + 4) self.__timer.timeout.connect(self.__bell)