eric6/WebBrowser/SiteInfo/SiteInfoDialog.py

changeset 8143
2c730d5fd177
parent 7937
181d1160f617
child 8218
7c09585bd960
equal deleted inserted replaced
8141:27f636beebad 8143:2c730d5fd177
46 @param browser reference to the browser window (HelpBrowser) 46 @param browser reference to the browser window (HelpBrowser)
47 @param parent reference to the parent widget (QWidget) 47 @param parent reference to the parent widget (QWidget)
48 """ 48 """
49 super(SiteInfoDialog, self).__init__(parent) 49 super(SiteInfoDialog, self).__init__(parent)
50 self.setupUi(self) 50 self.setupUi(self)
51 self.setWindowFlags(Qt.Window) 51 self.setWindowFlags(Qt.WindowType.Window)
52 52
53 # put icons 53 # put icons
54 self.tabWidget.setTabIcon( 54 self.tabWidget.setTabIcon(
55 0, UI.PixmapCache.getIcon("siteinfo-general")) 55 0, UI.PixmapCache.getIcon("siteinfo-general"))
56 self.tabWidget.setTabIcon( 56 self.tabWidget.setTabIcon(
165 for col in range(self.imagesTree.columnCount()): 165 for col in range(self.imagesTree.columnCount()):
166 self.imagesTree.resizeColumnToContents(col) 166 self.imagesTree.resizeColumnToContents(col)
167 if self.imagesTree.columnWidth(0) > 300: 167 if self.imagesTree.columnWidth(0) > 300:
168 self.imagesTree.setColumnWidth(0, 300) 168 self.imagesTree.setColumnWidth(0, 300)
169 self.imagesTree.setCurrentItem(self.imagesTree.topLevelItem(0)) 169 self.imagesTree.setCurrentItem(self.imagesTree.topLevelItem(0))
170 self.imagesTree.setContextMenuPolicy(Qt.CustomContextMenu) 170 self.imagesTree.setContextMenuPolicy(
171 Qt.ContextMenuPolicy.CustomContextMenu)
171 self.imagesTree.customContextMenuRequested.connect( 172 self.imagesTree.customContextMenuRequested.connect(
172 self.__imagesTreeContextMenuRequested) 173 self.__imagesTreeContextMenuRequested)
173 174
174 def __processMetaAttributes(self, res): 175 def __processMetaAttributes(self, res):
175 """ 176 """
241 @pyqtSlot() 242 @pyqtSlot()
242 def __imageReplyFinished(self): 243 def __imageReplyFinished(self):
243 """ 244 """
244 Private slot handling the loading of an image. 245 Private slot handling the loading of an image.
245 """ 246 """
246 if self.__imageReply.error() != QNetworkReply.NoError: 247 if self.__imageReply.error() != QNetworkReply.NetworkError.NoError:
247 return 248 return
248 249
249 data = self.__imageReply.readAll() 250 data = self.__imageReply.readAll()
250 self.__showPixmap(QPixmap.fromImage(QImage.fromData(data))) 251 self.__showPixmap(QPixmap.fromImage(QImage.fromData(data)))
251 252

eric ide

mercurial