How to add file browsing facility to my application?
-
There is a ready to use native or Qt folder and file selection dialogues, and you can also easily implement a file browser by using standard components like QTreeView and QListView with the addition of minimum custom code. There is also QFileSystemModel and a bunch of other classes.
Take a look here:
http://www.voidrealms.com/viewtutorial.aspx?id=61 -
From Qt Assistant:
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.
-
QFileDialogs static functions should be what you're looking for, like "getOpenFileName(..)":https://qt-project.org/doc/qt-4.8/qfiledialog.html#getOpenFileName
-
In that case "this":https://qt-project.org/doc/qt-4.8/model-view-programming.html#using-views-with-an-existing-model might be helpful.