I suppose itâs a Qt behaviour, and Qt applications donât have control of this.
Of the two directories I add this way, one almost always survives a restart, not the other one. The former is added in during âExport to file systemâ in the DICOM module, and the latter with âImport DICOM filesâ functions. They visually look the same though.
Using current Slicer preview on Windows, clicking âChoose Directory to Addâ brings up the Windows native file dialog so it remembers the last selected location and just overall easier to navigate to favorites/quick access locations from the Window File Explorer. This was as of Late June 2021 (ENH: Improve directory and file selection by using native dialogs ¡ Slicer/Slicer@2c3bbb7 ¡ GitHub). Not sure if youâre using current Slicer stable (4.11.20210226) which is older than that.
The Qt file dialog could not keep up with improvements in native file dialogs (that are provided by the operating system). The Qt dialog has a few nice features, such as automatic conversion of path separator characters from \ to / on Windows and ability to add more file loading/saving options inside the dialog, but lacks integrated search, recently used places, networking, etc. features and overall does not look familiar to users. Therefore, we decided to switch to native file dialogs everywhere.
If you still see a Qt file dialog somewhere in a recent Slicer Preview Release then let us know. It might be a case where we rely on some special Qt filedialog features so we could not easily replace it with a native dialog, but maybe we just missed it.
Thanks, it is good to know. Probably if Qt cannot access a native file dialog then it uses its own. Can you take a screenshot of the file dialogs that Slicer displays on your system?
I have never seen a native dialog in Linux from Slicer. I am using latest Linux with latest Gnome, and with any Slicer (4.11 stable, latest 4.13) I get the Qt file dialog (see my screenshot in the opener post).
I have been using Slicer in this computer since ages. Not sure if there is any system wide persistent cache folder that I should delete to start seeing native file dialogs.
QFileDialog documentation only mentions Windows and macOS related to native file dialog, which may indicate that linux may not be (well) supported. This discussion suggests that file dialogs of some linux distros and some Qt versions may be found depending on how Qt is built that is used for building Slicer.
You can submit an issue for this (either trying to enable native file dialog on linux and/or saving state of the file dialog), but most likely it would not be worked on anytime soon, as its priority would be quite low compared to other fixes and improvements.