-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiselect directories #1938
base: master
Are you sure you want to change the base?
Multiselect directories #1938
Conversation
The solution implemented is adapted and iterated upon from a method discussed on Stack Overflow for enabling QFileDialog to select and return multiple folders. For further details, see the discussion here. |
Thank you for your PR but this seems like a duplicate of #1871 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the work! How does this compare to #1871?
dialog.open(receive) | ||
if dialog.exec(): | ||
receive() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this change needed for?
@@ -172,6 +172,16 @@ def choose_file_dialog(parent, title, want_folder=True): | |||
dialog.setParent(parent, QtCore.Qt.WindowType.Sheet) | |||
if want_folder: | |||
dialog.setOption(QFileDialog.Option.ShowDirsOnly) | |||
dialog.setFileMode(QFileDialog.FileMode.Directory) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is duplicate.
…changes while calling QFileDialog corresponding to selecting folders.
…to change anything else.
…files to make sure multiple directories are added when directories are chosen
3b59979
to
a1d4072
Compare
This isn't optimal either: Now we have 2 different dialogs. Native one and the one from Qt. Would be best to have only one dialog for files and folders, including multiple ones. |
Multiselection of folders while selecting folders
Description
In the source, multiple folders cant be selected, due to some limitations in QFileDialog. This pull request solves and allows multiselection of folder everywhere where folders need to be selected
Fixes #1869
Motivation and Context
It would be more convenient if one can select multiple directories in one go, not having to open add folder dialog window multiple time, saving previous time and clicks.
How Has This Been Tested?
By running them locally in my system. No actual tests edited so far.
Screenshots (if appropriate):
Types of changes
Checklist:
I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.