Declare some utilities functions for QFileDialog. More...
Functions | |
void | qtlBrowseDirectory (QWidget *parent, QLineEdit *edit, const QString &title, const QString &defaultInitial=QDir::homePath()) |
Select a directory and set a QLineEdit with the selected value. More... | |
void | qtlBrowseFile (QWidget *parent, QLineEdit *edit, const QString &title, const QString &defaultInitial=QDir::homePath(), const QString &filters=QString()) |
Select an existing file and set a QLineEdit with the selected value. More... | |
Declare some utilities functions for QFileDialog.
Qtl, Qt utility library.
void qtlBrowseDirectory | ( | QWidget * | parent, |
QLineEdit * | edit, | ||
const QString & | title, | ||
const QString & | defaultInitial = QDir::homePath() |
||
) |
Select a directory and set a QLineEdit with the selected value.
Typically invoked by "Browse..." buttons for a directory.
[in] | parent | Optional parent widget. If not 0, the dialog will be shown centered over the parent widget. |
[in,out] | edit | Line edit to read and write. |
[in] | title | Browse window title. |
[in] | defaultInitial | Default directory to start from if edit is empty. The user's home directory by default. |
void qtlBrowseFile | ( | QWidget * | parent, |
QLineEdit * | edit, | ||
const QString & | title, | ||
const QString & | defaultInitial = QDir::homePath() , |
||
const QString & | filters = QString() |
||
) |
Select an existing file and set a QLineEdit with the selected value.
Typically invoked by "Browse..." buttons for a file.
[in] | parent | Optional parent widget. If not 0, the dialog will be shown centered over the parent widget. |
[in,out] | edit | Line edit to read and write. |
[in] | title | Browse window title. |
[in] | defaultInitial | Default file path to start from if edit is empty. The user's home directory by default. |
[in] | filters | File filters, see the documentation of QFileDialog::getOpenFileName(). |