Issue
In PyQt, how does one display a file browser that shows and selects only directories (not files)?
And how does one retrieve the name of the selected directory?
Solution
From inside your QDialog/QWidget class, you should be able to do:
file = str(QFileDialog.getExistingDirectory(self, "Select Directory"))
Answered By - TZHX
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.