I have been working on a new file dialog for Qt recently and would like to get feedback. A few fun highlights and screenshots taken from Linux for you to enjoy:
File Open:
On Windows and OS X we now pull the system icons and on Linux we get it from the current icon theme.

Save As:
Starting out small and simple clicking on the down button will present a smooth animation to the large dialog.
SaveAs big:
When Typing in the view a line edit will popup similar to how Qt Assistant behaves. It has completion and support for operations such as “..” to move up a directory.
Behind the scene the file dialog no longer uses the QDirModel, but a new model which is much improved. It uses less memory, stats the system less, is aware when files change in the directory you are viewing, and much more.
You can check out the new file dialog which is in the Qt snapshots. Once you download and compile the source you can run the Standard Dialogs example to check out the new file dialog. On Windows and OS X you will need to modify the Standard Dialogs source to avoid showing the native file dialog.
12 Responses to “New Qt File Dialog”
Will the new dialog support that you feed it your own model? I have had this need a couple of times and it has ended up so that I have to duplicate the whole dialog which seems like a waste.
It wont support setting the model, but it will support the ability to set a proxy model on top of the base model. This way you can add columns, hide/filter, add new drives and many things.
-Benjamin Meyer
To bad. What I need to do is to make it list files via a remote protocol. Is there any way I can convince you to extend the class to handle another model?
– Tobias
Have you thought about implementing a QAbstractFileEngineHandler? That might be able to solve it. If you already have an existing model you could use the a proxy model to combine the file system model and yours.
Looks nice…almost allows us to replace the native dialog with this one…the one feature it still seems to lack (on windows) is information about network drive mappings. I.E., instead of
C:
D:
G:
H:
We’d like to see.
Local Disk (C:)
DVD-RW Drive (D:)
data on ‘nisserver’ (G:)
home on ‘homeserver\windows’ (H:)
Any chance this feature will show up by 4.3.0? Seems like it might actually be a file engine handler thing but I’m not familiar enough with the details to know for sure.
trevor: yup, I would like to see that also. There is an existing task, #128927 to add that feature.
Good work, but is there an option to start the SaveAS big by default ?
I find it really annoying under Gnome…
Can it be extended like the current one? Eg in Scribus we have added extra checkboxes for compression options, file inclusion options (our collect to option).
I think it looks great. I don’t mind the smaller dialog first, actually Vista is using that method of displaying file dialogs. Great job!
Hi
One of the things we are doing is to virtualise the folder structures. So Imagine an online resource or a user taxonomy. Being able to set a model might have solved this. However I note some of the comments regarding QAbstractFileEngineHandler / Proxy model might work.
Nicolas said,
“Good work, but is there an option to start the SaveAS big by default ?
I find it really annoying under Gnome”¦”
In Gnome, Windows and OS X they all start small by default, a nice consistency among them. So currently there isn’t an option to start big in SaveAs.
Looks good….
However, I can get to network paths via mapped drive letters in Windows using getExistingDirectory() but otherwise am completely unable to access any network folders via another mechanism. For example if I specify a UNC network path in the initial path when I call the file dialog this shows me a blank dialog, etc. Am I doing something wrong? Should there not be another item in the icon listbox on the left for Network Places or something?
Keep up the good work.
The small save-as dialog looks like a solution without a problem. When you are saving or loading a file, you are doing *only* that, so it wouldn’t really matter if the dialog covers most of the screen. In fact I set up KDE to have bigger file dialogs.
In my experience of using the gnome dialog, I frequently want to save to somewhere other than the listed locations, and having to expand the dialog is annoying. What disadvantage did the old dialog have?
Also, a file extension column would be good!