当前位置: 首页 > news >正文

QFileDialog Class

Header:#include < QFileDialog >
qmake:QT += widgets
Inherits:QDialog

Public Types

enum AcceptMode { AcceptOpen, AcceptSave }
enum DialogLabel { LookIn, FileName, FileType, Accept, Reject }
enum FileMode { AnyFile, ExistingFile, Directory, ExistingFiles, DirectoryOnly }
enum Option { ShowDirsOnly, DontResolveSymlinks, DontConfirmOverwrite, DontUseNativeDialog, ReadOnly,, DontUseCustomDirectoryIcons }
flags Options
enum ViewMode { Detail, List }

Properties

acceptMode : AcceptMode
defaultSuffix : QString
fileMode : FileMode
options : Options
supportedSchemes : QStringList
viewMode : ViewMode

Public Functions

QFileDialog(QWidget *parent = nullptr, const QString &caption = QString(), const QString &directory = QString(), const QString &filter = QString())
QFileDialog(QWidget *parent, Qt::WindowFlags flags)
virtual ~QFileDialog()
QFileDialog::AcceptMode acceptMode() const
QString defaultSuffix() const
QDir directory() const
QUrl directoryUrl() const
QFileDialog::FileMode fileMode() const
QDir::Filters filter() const
QStringList history() const
QFileIconProvider *iconProvider() const
QAbstractItemDelegate *itemDelegate() const
QString labelText(QFileDialog::DialogLabel label) const
QStringList mimeTypeFilters() const
QStringList nameFilters() const
void open(QObject *receiver, const char *member)
QFileDialog::Options options() const
QAbstractProxyModel *proxyModel() const
bool restoreState(const QByteArray &state)
QByteArray saveState() const
void selectFile(const QString &filename)
void selectMimeTypeFilter(const QString &filter)
void selectNameFilter(const QString &filter)
void selectUrl(const QUrl &url)
QStringList selectedFiles() const
QString selectedMimeTypeFilter() const
QString selectedNameFilter() const
QList<QUrl> selectedUrls() const
void setAcceptMode(QFileDialog::AcceptMode mode)
void setDefaultSuffix(const QString &suffix)
void setDirectory(const QString &directory)
void setDirectory(const QDir &directory)
void setDirectoryUrl(const QUrl &directory)
void setFileMode(QFileDialog::FileMode mode)
void setFilter(QDir::Filters filters)
void setHistory(const QStringList &paths)
void setIconProvider(QFileIconProvider *provider)
void setItemDelegate(QAbstractItemDelegate *delegate)
void setLabelText(QFileDialog::DialogLabel label, const QString &text)
void setMimeTypeFilters(const QStringList &filters)
void setNameFilter(const QString &filter)
void setNameFilters(const QStringList &filters)
void setOption(QFileDialog::Option option, bool on = true)
void setOptions(QFileDialog::Options options)
void setProxyModel(QAbstractProxyModel *proxyModel)
void setSidebarUrls(const QList<QUrl> &urls)
void setSupportedSchemes(const QStringList &schemes)
void setViewMode(QFileDialog::ViewMode mode)
QList<QUrl> sidebarUrls() const
QStringList supportedSchemes() const
bool testOption(QFileDialog::Option option) const
QFileDialog::ViewMode viewMode() const

Reimplemented Public Functions

virtual void setVisible(bool visible) override

Signals

void currentChanged(const QString &path)
void currentUrlChanged(const QUrl &url)
void directoryEntered(const QString &directory)
void directoryUrlEntered(const QUrl &directory)
void fileSelected(const QString &file)
void filesSelected(const QStringList &selected)
void filterSelected(const QString &filter)
void urlSelected(const QUrl &url)
void urlsSelected(const QList<QUrl> &urls)

Static Public Members

QString getExistingDirectory(QWidget *parent = nullptr, const QString &caption = QString(), const QString &dir = QString(), QFileDialog::Options options = ShowDirsOnly)
QUrl getExistingDirectoryUrl(QWidget *parent = nullptr, const QString &caption = QString(), const QUrl &dir = QUrl(), QFileDialog::Options options = ShowDirsOnly, const QStringList &supportedSchemes = QStringList())
void getOpenFileContent(const QString &nameFilter, const std::function<void (const QString &, const QByteArray &)> &fileOpenCompleted)
QString getOpenFileName(QWidget *parent = nullptr, const QString &caption = QString(), const QString &dir = QString(), const QString &filter = QString(), QString *selectedFilter = nullptr, QFileDialog::Options options = Options())
QStringList getOpenFileNames(QWidget *parent = nullptr, const QString &caption = QString(), const QString &dir = QString(), const QString &filter = QString(), QString *selectedFilter = nullptr, QFileDialog::Options options = Options())
QUrl getOpenFileUrl(QWidget *parent = nullptr, const QString &caption = QString(), const QUrl &dir = QUrl(), const QString &filter 

http://www.mrgr.cn/news/47468.html

相关文章:

  • 【2024年华为OD机试】 (A卷,100分)- 端口合并(Java JS PythonC/C++)
  • 深度学习的原理和应用
  • 大数据技术实训:Hadoop完全分布式运行模式配置
  • el-table大数据量树形表格虚拟渲染,结合复选框的功能实现,利用vxe-table组件可实现该功能,不是手写!!!
  • 第四章补充:线性代数预备知识(B站:小崔说数)
  • YARN 集群
  • yq 工具
  • 前端笔记(一):父传子,子传父,获取DOM对象或组件,别名路径联想设置,elemntPlus
  • Hadoop再探讨
  • BERT模型学习笔记
  • 关于贝叶斯分类器的一份介绍
  • CANoe_调用C#控件的方法_DEMO方法演示
  • Python类基本知识
  • 联软安全助手卸载 UniAccess Agent,最简单的方法,两步解决!!!
  • C语言从头学67——学习头文件stddef.h和stdbool.h
  • 挑战高薪职位--全面掌握Oracle数据库:从入门到实战高薪技能(11g至19c)
  • 10.10今日错题解析(软考)
  • 爸妈总说着学门技术,学机器视觉技术确实是一条踏实的生活道路,这条路你走得下去走得通吗?
  • ubuntu 18.04虚拟机以太网网段与地平线J6板端连接配置
  • 排序算法——归并排序
  • Lumerical——光源(Sources)
  • 40亿个QQ号,限制1G内存,如何去重?
  • Python内置函数
  • 机器学习:序列模式算法的原理、应用场景及优缺点介绍
  • opencv的相机标定与姿态解算
  • uniapp 省、市、区、乡镇 数据层级选择插件 Ba-DataPicker