--- a/eric6/WebBrowser/CookieJar/CookiesExceptionsDialog.py Wed Jan 08 18:57:10 2020 +0100 +++ b/eric6/WebBrowser/CookieJar/CookiesExceptionsDialog.py Wed Jan 08 18:58:31 2020 +0100 @@ -59,10 +59,21 @@ header = self.exceptionsTable.horizontalHeader().sectionSizeHint( section) if section == 0: - header = fm.width("averagebiglonghost.averagedomain.info") + try: + header = fm.horizontalAdvance( + "averagebiglonghost.averagedomain.info") + except AttributeError: + header = fm.width( + "averagebiglonghost.averagedomain.info") elif section == 1: - header = fm.width(self.tr("Allow For Session")) - buffer = fm.width("mm") + try: + header = fm.horizontalAdvance(self.tr("Allow For Session")) + except AttributeError: + header = fm.width(self.tr("Allow For Session")) + try: + buffer = fm.horizontalAdvance("mm") + except AttributeError: + buffer = fm.width("mm") header += buffer self.exceptionsTable.horizontalHeader().resizeSection( section, header)