Currently Qt native apps trigger a tree-style folder selector, seen in the screenshot below. https://bugsfiles.kde.org/attachment.cgi?id=138680 However, as mentioned in bug 419874 comment 23 and bug 419874 comment 24, portal apps (the ones installed via flatpak, for example) trigger a folder selector that is a bit confusing because it looks like file open/save dialogs and it can have a preview panel (if it is enabled via Options button in the upper right corner), which is pointless for a folder selector. Please see the following screenshot. https://bugsfiles.kde.org/attachment.cgi?id=138679 For consistency reasons and to avoid potential confusion, I think that using tree-style folder selector with portal apps too would be nice. Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.22.80 KDE Frameworks Version: 5.83.0 Qt Version: 5.15.2 Graphics Platform: X11
The issue is that the tree-style folder selection is only implemented in the plasma platformtheme plugin (in plasma-integration), and only accessible through QFileDialog. QFileDialog does not provide some of the APIs necessary to implement e.g. option selection. To fix this, KDirSelectDialog (and its dependencies) would have to be extracted from plasma-integration into KIO.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/62
Git commit 551c583bd883056d28895597ce8d4571cd6a6f81 by Fabian Vogt. Committed on 18/01/2022 at 20:02. Pushed by fvogt into branch 'master'. Use QFileDialog for selecting directories KFileWidget is not as good at selecting directories as KDirSelectDialog from plasma-integration. On top of that, directory selection appears to be entirely broken currently. Use KDirSelectDialog through QFileDialog if possible. M +32 -0 src/filechooser.cpp https://invent.kde.org/plasma/xdg-desktop-portal-kde/commit/551c583bd883056d28895597ce8d4571cd6a6f81
Git commit 4b29ae78943b46ddfa3f3eca45c442f13c5a67e8 by Fabian Vogt. Committed on 19/01/2022 at 09:37. Pushed by fvogt into branch 'Plasma/5.24'. Use QFileDialog for selecting directories KFileWidget is not as good at selecting directories as KDirSelectDialog from plasma-integration. On top of that, directory selection appears to be entirely broken currently. Use KDirSelectDialog through QFileDialog if possible. (cherry picked from commit 551c583bd883056d28895597ce8d4571cd6a6f81) M +32 -0 src/filechooser.cpp https://invent.kde.org/plasma/xdg-desktop-portal-kde/commit/4b29ae78943b46ddfa3f3eca45c442f13c5a67e8
*** Bug 449289 has been marked as a duplicate of this bug. ***