diff options
Diffstat (limited to 'src/converter/browseSchematic.py')
-rw-r--r-- | src/converter/browseSchematic.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/converter/browseSchematic.py b/src/converter/browseSchematic.py new file mode 100644 index 00000000..58d6353b --- /dev/null +++ b/src/converter/browseSchematic.py @@ -0,0 +1,11 @@ +from PyQt5.QtWidgets import QFileDialog + +def browse_path(self, text_box): + file_dialog = QFileDialog() # a dialog that allows the user to select files or directories + file_dialog.setFileMode(QFileDialog.AnyFile) + file_dialog.setNameFilter("Supported Files (*.sch *.asc *.slb *.asy);;ASY Files (*.asy)") # Include all supported extensions + file_dialog.exec_() # Execute the dialog + + selected_files = file_dialog.selectedFiles() # Get the selected file(s) + if selected_files: + text_box.setText(selected_files[0]) |