src/eric7/EricWidgets/EricProgressDialog.py

branch
eric7
changeset 11035
e1e1d6e317c7
parent 10439
21c28b0f9e41
child 11090
f5f5f5803935
--- a/src/eric7/EricWidgets/EricProgressDialog.py	Sun Nov 03 17:50:34 2024 +0100
+++ b/src/eric7/EricWidgets/EricProgressDialog.py	Sun Nov 03 18:12:28 2024 +0100
@@ -7,7 +7,7 @@
 Module implementing a progress dialog allowing a customized progress bar label.
 """
 
-from PyQt6.QtCore import Qt
+from PyQt6.QtCore import QCoreApplication, Qt
 from PyQt6.QtWidgets import QProgressBar, QProgressDialog
 
 
@@ -45,6 +45,9 @@
         @param flags window flags of the dialog
         @type Qt.WindowFlags
         """
+        if parent is None:
+            parent = QCoreApplication.instance().getMainWindow()
+
         if flags is None:
             flags = Qt.WindowType(0)
         super().__init__(labelText, cancelButtonText, minimum, maximum, parent, flags)

eric ide

mercurial