PyQt:如何从用户那里获取大量文件名?
pyqt 中的 FileDialog 是一种从用户那里获取文件的一个路径的绝佳方法,但是有没有一种好方法可以从用户那里获取大量文件选择呢?
The FileDialog in pyqt is an excellent way to get one path for a file from the user, but is there a good way to get a large number of file selections from the user?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用 QFileDialog.getOpenFileNames 允许用户选择多个文件:
Use QFileDialog.getOpenFileNames to allow the user to select multiple files:
我建议您让用户使用拖放功能直接从他们最喜欢的文件浏览器中添加文件。因为我在 wxpython 中做到了这一点,没有任何问题,并且用户反馈非常好:)
I would suggest you to let the user use drag & drop to add files directly from their favorite file browser. As I did this in wxpython without any trouble and user-feedbacks are pretty good :)