May 2019
Intermediate to advanced
542 pages
13h 37m
English
Applications commonly need to open or save files, and users need an easy way to browse and select those files. Qt provides us with the QFileDialog class to meet this need.
Just as with QMessageBox, the QFileDialog class contains several static methods that display an appropriate modal dialog box and return the value selected by the user.
This table shows the static methods and their intended use:
| Method | Returns | Description |
|---|---|---|
| getExistingDirectory | String | Select an existing directory path. |
| getExistingDirectoryUrl | QUrl | Select an existing directory URL. |
| getOpenFileName | String | Select an existing filename path to open. |
| getOpenFileNames | List | Select multiple existing filename paths to open. |
| getOpenFileUrl | QUrl | Select an existing ... |
Read now
Unlock full access