eric6/PipInterface/PipPackageDetailsDialog.py

changeset 8143
2c730d5fd177
parent 8090
c53117374255
child 8218
7c09585bd960
--- a/eric6/PipInterface/PipPackageDetailsDialog.py	Mon Mar 01 17:48:43 2021 +0100
+++ b/eric6/PipInterface/PipPackageDetailsDialog.py	Tue Mar 02 17:17:09 2021 +0100
@@ -38,16 +38,16 @@
         """
         super(PipPackageDetailsDialog, self).__init__(parent)
         self.setupUi(self)
-        self.setWindowFlags(Qt.Window)
+        self.setWindowFlags(Qt.WindowType.Window)
         
         self.__pipWidget = parent
         
         self.__installButton = self.buttonBox.addButton(
-            self.tr("Install"), QDialogButtonBox.ActionRole)
+            self.tr("Install"), QDialogButtonBox.ButtonRole.ActionRole)
         self.__removeButton = self.buttonBox.addButton(
-            self.tr("Uninstall"), QDialogButtonBox.ActionRole)
+            self.tr("Uninstall"), QDialogButtonBox.ButtonRole.ActionRole)
         self.__upgradeButton = self.buttonBox.addButton(
-            self.tr("Upgrade"), QDialogButtonBox.ActionRole)
+            self.tr("Upgrade"), QDialogButtonBox.ButtonRole.ActionRole)
         
         self.__locale = QLocale()
         self.__packageTypeMap = {
@@ -104,9 +104,11 @@
                 self.__sanitize(detailsData["docs_url"], forUrl=True)))
         self.classifiersList.addItems(detailsData["classifiers"])
         
-        self.buttonBox.button(QDialogButtonBox.Close).setDefault(True)
-        self.buttonBox.button(QDialogButtonBox.Close).setFocus(
-            Qt.OtherFocusReason)
+        self.buttonBox.button(
+            QDialogButtonBox.StandardButton.Close).setDefault(True)
+        self.buttonBox.button(
+            QDialogButtonBox.StandardButton.Close).setFocus(
+                Qt.FocusReason.OtherFocusReason)
     
     def __populateDownloadUrls(self, downloadsData):
         """
@@ -138,11 +140,12 @@
                 urlLabel = QLabel('<a href="{0}#md5={2}">{1}</a>{3}'.format(
                     download["url"], download["filename"],
                     download["md5_digest"], pgpLink))
-                urlLabel.setTextInteractionFlags(Qt.LinksAccessibleByMouse)
+                urlLabel.setTextInteractionFlags(
+                    Qt.TextInteractionFlag.LinksAccessibleByMouse)
                 urlLabel.setOpenExternalLinks(True)
                 self.downloadUrlsList.setItemWidget(itm, 0, urlLabel)
             header = self.downloadUrlsList.header()
-            header.resizeSections(QHeaderView.ResizeToContents)
+            header.resizeSections(QHeaderView.ResizeMode.ResizeToContents)
         else:
             self.infoWidget.setTabEnabled(index, False)
     

eric ide

mercurial