--- a/src/eric7/WebBrowser/SafeBrowsing/SafeBrowsingInfoWidget.py Wed Jul 13 11:16:20 2022 +0200 +++ b/src/eric7/WebBrowser/SafeBrowsing/SafeBrowsingInfoWidget.py Wed Jul 13 14:55:47 2022 +0200 @@ -17,36 +17,38 @@ """ Class implementing a widget to show some threat information. """ + def __init__(self, info, parent=None): """ Constructor - + @param info information string to be shown @type str @param parent reference to the parent widget @type QWidget """ super().__init__(parent) - + self.setMinimumWidth(500) - + layout = QHBoxLayout(self) - + iconLabel = QLabel(self) iconLabel.setPixmap(UI.PixmapCache.getPixmap("safeBrowsing48")) layout.addWidget(iconLabel, 0, Qt.AlignmentFlag.AlignTop) - + infoLabel = QLabel(self) infoLabel.setWordWrap(True) - infoLabel.setSizePolicy(QSizePolicy.Policy.Expanding, - QSizePolicy.Policy.Expanding) + infoLabel.setSizePolicy( + QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding + ) infoLabel.setText(info) layout.addWidget(infoLabel, 0, Qt.AlignmentFlag.AlignTop) - + def showAt(self, pos): """ Public method to show the widget. - + @param pos position to show at @type QPoint """