ProjectFlask/RunServerDialog.py

branch
eric7
changeset 72
4557829a4acf
parent 70
22e1d0f69668
child 75
7a30d96ea9f6
--- a/ProjectFlask/RunServerDialog.py	Wed Sep 21 16:30:55 2022 +0200
+++ b/ProjectFlask/RunServerDialog.py	Tue Oct 25 10:07:29 2022 +0200
@@ -13,16 +13,18 @@
 from PyQt6.QtGui import QTextCharFormat
 from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QMenu
 
-from EricWidgets import EricMessageBox
-from EricWidgets.EricApplication import ericApp
+try:
+    from eric7.EricGui import EricPixmapCache
+except ImportError:
+    from UI import PixmapCache as EricPixmapCache
+from eric7.EricWidgets import EricMessageBox
+from eric7.EricWidgets.EricApplication import ericApp
 
 from .Ui_RunServerDialog import Ui_RunServerDialog
 
 from . import AnsiTools
 from .ServerStartOptionsDialog import ServerStartOptionsDialog
 
-import UI.PixmapCache
-
 
 # TODO: should this be placed into the sidebar as a sidebar widget?
 class RunServerDialog(QDialog, Ui_RunServerDialog):
@@ -83,7 +85,7 @@
             self.tr("Re-start Server with Options"), self.__restartServerWithOptions
         )
 
-        self.menuButton.setIcon(UI.PixmapCache.getIcon("actionsToolButton"))
+        self.menuButton.setIcon(EricPixmapCache.getIcon("actionsToolButton"))
         self.menuButton.setMenu(self.__actionsMenu)
 
     @pyqtSlot()

eric ide

mercurial