QFileDialog

The QFileDialog class provides a dialog that allow users to select files or directories.

The QFileDialog class enables a user to traverse the file system in order to select one or many files or a directory.

The easiest way to create a QFileDialog is to use the static functions. On Windows, Mac OS X, KDE and GNOME, these static functions will call the native file dialog when possible.

这个QFileDialog类提供了一个dialog允许用户去选择文件和目录
这个QFileDialog类能让用户去传输那个文件系统为了选择
In the above example, a modal QFileDialog is created using a static function. The dialog initially displays the contents of the "/home/jana" directory, and displays files matching the patterns given in the string "Image Files (*.png *.jpg *.bmp)". The parent of the file dialog is set tothis, and the window title is set to "Open Image".
QFileDialog
在上面的列子,一个模态的

You can create your own QFileDialog without using the static functions. By calling setFileMode(), you can specify what the user must select in the dialog:

 QFileDialog dialog(this);
 dialog.setFileMode(QFileDialog::AnyFile);
By default, the native file dialog is used unless you use a subclass of QFileDialog that contains the Q_OBJECT macro.
默认的,在本地的
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值