- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties

# QFileDialog Class Reference

Search for all occurrences

## Detailed Description

Examples:

  TextureConveyor/TextureConveyor.cpp.

Definition at line 66 of file qfiledialog.h.

`#include <qfiledialog.h>`

Inheritance diagram for QFileDialog:
[legend]

List of all members.

## Public Types
enum | ViewMode { Detail, List }
enum | FileMode { AnyFile, ExistingFile, Directory, ExistingFiles, DirectoryOnly }
enum | AcceptMode { AcceptOpen, AcceptSave }
enum | DialogLabel { LookIn, FileName, FileType, Accept, Reject }
enum | Option { ShowDirsOnly = 0x00000001, DontResolveSymlinks = 0x00000002, DontConfirmOverwrite = 0x00000004, DontUseSheet = 0x00000008, DontUseNativeDialog = 0x00000010, ReadOnly = 0x00000020, HideNameFilterDetails = 0x00000040 }
## Signals
void | fileSelected (const QString &file)
void | filesSelected (const QStringList &files)
void | currentChanged (const QString &path)
void | directoryEntered (const QString &directory)
void | filterSelected (const QString &filter)
## Public Member Functions
| QFileDialog (QWidget *parent, Qt::WindowFlags f)
| QFileDialog (QWidget *parent=0, const QString &caption=QString(), const QString &directory=QString(), const QString &filter=QString())
| ~QFileDialog ()
void | setDirectory (const QString &directory)
void | setDirectory (const QDir &directory)
QDir | directory () const
void | selectFile (const QString &filename)
QStringList | selectedFiles () const
void | setNameFilterDetailsVisible (bool enabled)
bool | isNameFilterDetailsVisible () const
void | setNameFilter (const QString &filter)
void | setNameFilters (const QStringList &filters)
QStringList | nameFilters () const
void | selectNameFilter (const QString &filter)
QString | selectedNameFilter () const
QDir::Filters | filter () const
void | setFilter (QDir::Filters filters)
void | setViewMode (ViewMode mode)
ViewMode | viewMode () const
void | setFileMode (FileMode mode)
FileMode | fileMode () const
void | setAcceptMode (AcceptMode mode)
AcceptMode | acceptMode () const
void | setReadOnly (bool enabled)
bool | isReadOnly () const
void | setResolveSymlinks (bool enabled)
bool | resolveSymlinks () const
void | setSidebarUrls (const QList< QUrl > &urls)
QList< QUrl > | sidebarUrls () const
QByteArray | saveState () const
bool | restoreState (const QByteArray &state)
void | setConfirmOverwrite (bool enabled)
bool | confirmOverwrite () const
void | setDefaultSuffix (const QString &suffix)
QString | defaultSuffix () const
void | setHistory (const QStringList &paths)
QStringList | history () const
void | setItemDelegate (QAbstractItemDelegate *delegate)
QAbstractItemDelegate * | itemDelegate () const
void | setIconProvider (QFileIconProvider *provider)
QFileIconProvider * | iconProvider () const
void | setLabelText (DialogLabel label, const QString &text)
QString | labelText (DialogLabel label) const
void | setProxyModel (QAbstractProxyModel *model)
QAbstractProxyModel * | proxyModel () const
void | setOption (Option option, bool on=true)
bool | testOption (Option option) const
void | setOptions (Options options)
Options | options () const
void | open (QObject *receiver, const char *member)
void | setVisible (bool visible)
## Static Public Member Functions
static QString | getOpenFileName (QWidget *parent=0, const QString &caption=QString(), const QString &dir=QString(), const QString &filter=QString(), QString *selectedFilter=0, Options options=0)
static QString | getSaveFileName (QWidget *parent=0, const QString &caption=QString(), const QString &dir=QString(), const QString &filter=QString(), QString *selectedFilter=0, Options options=0)
static QString | getExistingDirectory (QWidget *parent=0, const QString &caption=QString(), const QString &dir=QString(), Options options=ShowDirsOnly)
static QStringList | getOpenFileNames (QWidget *parent=0, const QString &caption=QString(), const QString &dir=QString(), const QString &filter=QString(), QString *selectedFilter=0, Options options=0)
## Protected Member Functions
| QFileDialog (const QFileDialogArgs &args)
void | done (int result)
void | accept ()
void | changeEvent (QEvent *e)
## Properties
ViewMode | viewMode
FileMode | fileMode
AcceptMode | acceptMode
bool | readOnly
bool | resolveSymlinks
bool | confirmOverwrite
QString | defaultSuffix
bool | nameFilterDetailsVisible
Options | options

## Member Enumeration Documentation

enum ViewMode

Search for all occurrences

Enumerator:

  Detail | Search for all occurrences
  List | Search for all occurrences

Definition at line 83 of file qfiledialog.h.

    { Detail, List };

enum FileMode

Search for all occurrences

Enumerator:

  AnyFile | Search for all occurrences
  ExistingFile | Search for all occurrences
  Directory | Search for all occurrences
  ExistingFiles | Search for all occurrences
  DirectoryOnly | Search for all occurrences

Definition at line 84 of file qfiledialog.h.

    { AnyFile, ExistingFile, Directory, ExistingFiles, DirectoryOnly };

enum AcceptMode

Search for all occurrences

Enumerator:

  AcceptOpen | Search for all occurrences
  AcceptSave | Search for all occurrences

Definition at line 85 of file qfiledialog.h.

    { AcceptOpen, AcceptSave };

enum DialogLabel

Search for all occurrences

Enumerator:

  LookIn | Search for all occurrences
  FileName | Search for all occurrences
  FileType | Search for all occurrences
  Accept | Search for all occurrences
  Reject | Search for all occurrences

Definition at line 86 of file qfiledialog.h.

    { LookIn, FileName, FileType, Accept, Reject };

enum Option

Search for all occurrences

Enumerator:

  ShowDirsOnly | Search for all occurrences
  DontResolveSymlinks | Search for all occurrences
  DontConfirmOverwrite | Search for all occurrences
  DontUseSheet | Search for all occurrences
  DontUseNativeDialog | Search for all occurrences
  ReadOnly | Search for all occurrences
  HideNameFilterDetails | Search for all occurrences

Definition at line 89 of file qfiledialog.h.

        {
            ShowDirsOnly          = 0x00000001,
            DontResolveSymlinks   = 0x00000002,
            DontConfirmOverwrite  = 0x00000004,
            DontUseSheet          = 0x00000008,
            DontUseNativeDialog   = 0x00000010,
            ReadOnly              = 0x00000020,
            HideNameFilterDetails = 0x00000040
        };

## Constructor & Destructor Documentation

QFileDialog | ( | QWidget * | parent,
|  | Qt::WindowFlags | f
| ) |  |

QFileDialog | ( | QWidget * | parent = `0`,
|  | const QString & | caption = `QString()`,
|  | const QString & | directory = `QString()`,
|  | const QString & | filter = `QString()`
| ) |  | `[explicit]`

~QFileDialog | ( |  | ) |

QFileDialog | ( | const QFileDialogArgs & | args | ) | `[protected]`

## Member Function Documentation

void setDirectory | ( | const QString & | directory | ) |

Search for all occurrences

void setDirectory | ( | const QDir & | directory | ) | `[inline]`

Search for all occurrences

Definition at line 320 of file qfiledialog.h.

    { setDirectory(adirectory.absolutePath()); }

QDir directory | ( |  | ) | const

Search for all occurrences

void selectFile | ( | const QString & | filename | ) |

Search for all occurrences

QStringList selectedFiles | ( |  | ) | const

Search for all occurrences

void setNameFilterDetailsVisible | ( | bool | enabled | ) |

Search for all occurrences

bool isNameFilterDetailsVisible | ( |  | ) | const

Search for all occurrences

void setNameFilter | ( | const QString & | filter | ) |

Search for all occurrences

void setNameFilters | ( | const QStringList & | filters | ) |

Search for all occurrences

QStringList nameFilters | ( |  | ) | const

Search for all occurrences

void selectNameFilter | ( | const QString & | filter | ) |

Search for all occurrences

QString selectedNameFilter | ( |  | ) | const

Search for all occurrences

QDir::Filters filter | ( |  | ) | const

Search for all occurrences

void setFilter | ( | QDir::Filters | filters | ) |

Search for all occurrences

void setViewMode | ( | ViewMode | mode | ) |

Search for all occurrences

ViewMode viewMode | ( |  | ) | const

Search for all occurrences

void setFileMode | ( | FileMode | mode | ) |

Search for all occurrences

FileMode fileMode | ( |  | ) | const

Search for all occurrences

void setAcceptMode | ( | AcceptMode | mode | ) |

Search for all occurrences

AcceptMode acceptMode | ( |  | ) | const

Search for all occurrences

void setReadOnly | ( | bool | enabled | ) |

Search for all occurrences

bool isReadOnly | ( |  | ) | const

Search for all occurrences

void setResolveSymlinks | ( | bool | enabled | ) |

Search for all occurrences

bool resolveSymlinks | ( |  | ) | const

Search for all occurrences

void setSidebarUrls | ( | const QList< QUrl > & | urls | ) |

Search for all occurrences

QList<QUrl> sidebarUrls | ( |  | ) | const

Search for all occurrences

QByteArray saveState | ( |  | ) | const

Search for all occurrences

bool restoreState | ( | const QByteArray & | state | ) |

Search for all occurrences

void setConfirmOverwrite | ( | bool | enabled | ) |

Search for all occurrences

bool confirmOverwrite | ( |  | ) | const

Search for all occurrences

void setDefaultSuffix | ( | const QString & | suffix | ) |

Search for all occurrences

QString defaultSuffix | ( |  | ) | const

Search for all occurrences

void setHistory | ( | const QStringList & | paths | ) |

Search for all occurrences

QStringList history | ( |  | ) | const

Search for all occurrences

void setItemDelegate | ( | QAbstractItemDelegate * | delegate | ) |

Search for all occurrences

QAbstractItemDelegate* itemDelegate | ( |  | ) | const

Search for all occurrences

void setIconProvider | ( | QFileIconProvider * | provider | ) |

Search for all occurrences

QFileIconProvider* iconProvider | ( |  | ) | const

Search for all occurrences

void setLabelText | ( | DialogLabel | label,
|  | const QString & | text
| ) |  |

Search for all occurrences

QString labelText | ( | DialogLabel | label | ) | const

Search for all occurrences

void setProxyModel | ( | QAbstractProxyModel * | model | ) |

Search for all occurrences

QAbstractProxyModel* proxyModel | ( |  | ) | const

Search for all occurrences

void setOption | ( | Option | option,
|  | bool | on = `true`
| ) |  |

Search for all occurrences

bool testOption | ( | Option | option | ) | const

Search for all occurrences

void setOptions | ( | Options | options | ) |

Search for all occurrences

Options options | ( |  | ) | const

Search for all occurrences

void open | ( | QObject * | receiver,
|  | const char * | member
| ) |  |

Search for all occurrences

void setVisible | ( | bool | visible | ) | `[virtual]`

Search for all occurrences

Reimplemented from QDialog.

void fileSelected | ( | const QString & | file | ) | `[signal]`

Search for all occurrences

void filesSelected | ( | const QStringList & | files | ) | `[signal]`

Search for all occurrences

void currentChanged | ( | const QString & | path | ) | `[signal]`

Search for all occurrences

void directoryEntered | ( | const QString & | directory | ) | `[signal]`

Search for all occurrences

void filterSelected | ( | const QString & | filter | ) | `[signal]`

Search for all occurrences

static QString getOpenFileName | ( | QWidget * | parent = `0`,
|  | const QString & | caption = `QString()`,
|  | const QString & | dir = `QString()`,
|  | const QString & | filter = `QString()`,
|  | QString * | selectedFilter = `0`,
|  | Options | options = `0`
| ) |  | `[static]`

Search for all occurrences

static QString getSaveFileName | ( | QWidget * | parent = `0`,
|  | const QString & | caption = `QString()`,
|  | const QString & | dir = `QString()`,
|  | const QString & | filter = `QString()`,
|  | QString * | selectedFilter = `0`,
|  | Options | options = `0`
| ) |  | `[static]`

Search for all occurrences

static QString getExistingDirectory | ( | QWidget * | parent = `0`,
|  | const QString & | caption = `QString()`,
|  | const QString & | dir = `QString()`,
|  | Options | options = `ShowDirsOnly`
| ) |  | `[static]`

Search for all occurrences

static QStringList getOpenFileNames | ( | QWidget * | parent = `0`,
|  | const QString & | caption = `QString()`,
|  | const QString & | dir = `QString()`,
|  | const QString & | filter = `QString()`,
|  | QString * | selectedFilter = `0`,
|  | Options | options = `0`
| ) |  | `[static]`

Search for all occurrences

void done | ( | int | result | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QDialog.

void accept | ( |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QDialog.

void changeEvent | ( | QEvent * | e | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

## Property Documentation

ViewMode viewMode `[read, write]`

Search for all occurrences

Definition at line 71 of file qfiledialog.h.

FileMode fileMode `[read, write]`

Search for all occurrences

Definition at line 72 of file qfiledialog.h.

AcceptMode acceptMode `[read, write]`

Search for all occurrences

Definition at line 73 of file qfiledialog.h.

bool readOnly `[read, write]`

Search for all occurrences

Definition at line 74 of file qfiledialog.h.

bool resolveSymlinks `[read, write]`

Search for all occurrences

Definition at line 75 of file qfiledialog.h.

bool confirmOverwrite `[read, write]`

Search for all occurrences

Definition at line 76 of file qfiledialog.h.

QString defaultSuffix `[read, write]`

Search for all occurrences

Definition at line 77 of file qfiledialog.h.

bool nameFilterDetailsVisible `[read, write]`

Search for all occurrences

Definition at line 79 of file qfiledialog.h.

Options options `[read, write]`

Search for all occurrences

Definition at line 80 of file qfiledialog.h.

The documentation for this class was generated from the following file:

- QtGui/qfiledialog.h

QFileDialog QFileDialog QFileDialog QFileDialog QFileDialog QFileDialog QFileDialog QFileDialog QFileDialog QFileDialog
QFileDialog QFileDialog QFileDialog QFileDialog QFileDialog QFileDialog QFileDialog QFileDialog QFileDialog QFileDialog