--- a/src/eric7/EricWidgets/EricPathPickerDialog.py Sun Nov 03 17:50:34 2024 +0100 +++ b/src/eric7/EricWidgets/EricPathPickerDialog.py Sun Nov 03 18:12:28 2024 +0100 @@ -7,6 +7,7 @@ Module implementing a dialog to enter a file system path using a file picker. """ +from PyQt6.QtCore import QCoreApplication from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QLabel, QVBoxLayout from .EricPathPicker import EricPathPicker, EricPathPickerModes @@ -169,6 +170,9 @@ user pressed the OK button @rtype tuple of (str, bool) """ + if parent is None: + parent = QCoreApplication.instance().getMainWindow() + # step 1: setup of the dialog dlg = EricPathPickerDialog(parent) if title: @@ -227,6 +231,9 @@ user pressed the OK button @rtype tuple of (pathlib.Path, bool) """ + if parent is None: + parent = QCoreApplication.instance().getMainWindow() + # step 1: setup of the dialog dlg = EricPathPickerDialog(parent) if title: