I already opened a bug for xdg-desktop-portal-kde, but maybe a workaround could be added until it is fixed: https://bugs.kde.org/show_bug.cgi?id=408341 Something changed between 4.1 and 4.2 with the file dialog handling. Under KDE Plasma open and closing a file dialog freezes the app. This doesn't happen under GNOME, because there the Qt dialogs are used, while under KDE Plasma the native dialogs are used (backed by xdg-desktop-portal-kde in this case).
All that changed is that we updated to a new version of Qt; there is no file dialog code in Krita...
You can install both version side by side and test it yourself: stable branch (4.2.1): $ flatpak remote-add flathub https://flathub.org/repo/flathub.flatpakrepo $ flatpak install flathub org.kde.krita $ flatpak run org.kde.krita//stable beta branch (4.1.8): $ flatpak remote-add flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo $ flatpak install flathub-beta org.kde.krita $ flatpak run org.kde.krita//beta Both branches use the same KDE runtime (with Qt 5.12.4). I also tested other KDE apps (kdenlive, kolourpaint) that worked. That's why I think is a Krita specific bug.
I can reproduce, but it's weird I can reproduce it with Krita only, I have been trying my test application. I set up file dialogs same way as Krita does and I was unable to reproduce the issue. I don't really know what is going on. I'll try to investigate further if I find some time.
After updating Krita to 4.2.3, this bug seems to be gone.
Maybe something in the runtime was fixed?!