Multiselect directories#1938
Closed
rajb957 wants to merge 5 commits intoborgbase:masterfrom
rajb957:multiselect-directories
Closed
Multiselect directories#1938rajb957 wants to merge 5 commits intoborgbase:masterfrom rajb957:multiselect-directories
rajb957 wants to merge 5 commits intoborgbase:masterfrom
rajb957:multiselect-directories
Conversation
Author
|
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 |
9 tasks
sayem314
approved these changes
Feb 24, 2024
Collaborator
real-yfprojects
left a comment
There was a problem hiding this comment.
Thank you for the work! How does this compare to #1871?
Comment on lines
-645
to
+646
| dialog.open(receive) | ||
| if dialog.exec(): | ||
| receive() |
Collaborator
There was a problem hiding this comment.
What is this change needed for?
| dialog.setParent(parent, QtCore.Qt.WindowType.Sheet) | ||
| if want_folder: | ||
| dialog.setOption(QFileDialog.Option.ShowDirsOnly) | ||
| dialog.setFileMode(QFileDialog.FileMode.Directory) |
Collaborator
There was a problem hiding this comment.
This line is duplicate.
added 5 commits
April 8, 2024 12:55
…changes while calling QFileDialog corresponding to selecting folders.
…to change anything else.
…files to make sure multiple directories are added when directories are chosen
Contributor
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.