I’m really struggling to get an “Open Directory” dialog working in a snap. The dialog really fits in niceley in the GTK Theme, but instead of selecting a directory, only file-selection is possible (Clicking of open opens the folder in the dialog instead of selecting the folder and returning the path to the app).
DontUseNativeDialog option, folder selection is possible, but i try to avoid this, because
- I prefer not to change the existing code of an application
- it looks pretty ugly.
I am using the QT
QFileDialog class with QFileDialog::ShowDirsOnly.
My snap is based on core18 and i use the KDE extension to keep the snap small.
The behaviour of the snap is consistent in all Versions: Ubuntu 18.04, 20.04 and 20.10 (where the new xdg-desktop-portal package is installed on the host) and regardless of the environment variable QT_QPA_PLATFORMTHEME (gtk3 or xdgdesktopportal).
Here the versions i use:
snapcraft, version 4.4.4
Can i force the app to not use portals?
Is there another way?
Does this work for anyone?