QFileDialog如何选择多个文件
2016-09-17 09:03
337 查看
QFileDialog 按说是默认选择多个文件,但是我的ctrl 和shift键都不管用,每次只能选择一个文件,很惆怅....
网上大部分都是问如何选择多个文件和文件夹的.后来发现:
add_file_dialog->setFileMode(QFileDialog::ExistingFiles);
是设置选择多个文件的, 请注意和以下语句的区别
add_file_dialog->setFileMode(QFileDialog::ExistingFile);
enum QFileDialog::FileMode
This enum is used to indicate what the user may select in the file dialog; i.e. what the dialog will return if the user clicks OK.
Constant Value Description
QFileDialog::AnyFile 0 The name of a file, whether it exists or not.
QFileDialog::ExistingFile 1 The name of a single existing file.
QFileDialog::Directory 2 The name of a directory. Both files and directories are displayed.
QFileDialog::ExistingFiles 3 The names of zero or more existing files.
email: tongzhuodenilove@163.com
author:wsh
网上大部分都是问如何选择多个文件和文件夹的.后来发现:
add_file_dialog->setFileMode(QFileDialog::ExistingFiles);
是设置选择多个文件的, 请注意和以下语句的区别
add_file_dialog->setFileMode(QFileDialog::ExistingFile);
enum QFileDialog::FileMode
This enum is used to indicate what the user may select in the file dialog; i.e. what the dialog will return if the user clicks OK.
Constant Value Description
QFileDialog::AnyFile 0 The name of a file, whether it exists or not.
QFileDialog::ExistingFile 1 The name of a single existing file.
QFileDialog::Directory 2 The name of a directory. Both files and directories are displayed.
QFileDialog::ExistingFiles 3 The names of zero or more existing files.
email: tongzhuodenilove@163.com
author:wsh
相关文章推荐
- CFileDialog如何选择多个文件
- 如何得到通过GetOpenFileName选择的多个文件的文件名
- asp.net C#如何调用文件选择窗口
- 如何得到通过GetOpenFileName选择的多个文件的文件名
- asp.net 浏览按钮 asp.net C# 如何点击按钮弹出选择文件对话框
- Code UI Test如何配置code coverage(启用及选择所包括的文件)
- 如何把一个lib库文件加入到VC.NET项目中去 选择自 SEUU 的 Blog
- 如何选择集群文件系统
- 【转】如何得到通过GetOpenFileName选择的多个文件的文件名
- 当有多个SiteMap文件时,如何让SiteMapDataSource选择特定的SiteMap文件(转)
- 在VC中如何使用对话框让用户选择自己保存文件的路径
- 显示复选框选择的内容--如何读取多个选项(asp)
- vf表单中如何根据组合框内容而选择不同文件再根据不同文件改变文本框的内容
- 一个TIF文件包含多个文件,如何显示每一张图片
- 如何用c#打开文件夹并选择文件夹内的一个文件 open folder and select file
- 如何得到通过GetOpenFileName选择的多个文件的文件名
- 如何得到通过GetOpenFileName选择的多个文件的文件名
- 当有多个SiteMap文件时,如何让SiteMapDataSource选择特定的SiteMap文件
- 如何在网页中显示选择文件对话框
- myeclipse 选择了Package Explorer后会打开相应的文件,如何去掉