That's an idea - I've tried with zenity being preferred and fselect assigns value to variable as expected. I don't have xdialog installed so if I try xdialog I get "unable to load suitable backend" but not terminal output like yours.
I suspect kdialog part of UI::Dialog hasn't been updated to work with latest KDE. On my system there was a jump from 4 to 5, not sure about exact version when it got broken. I use kdialog for file selection all the time and it works flawlessly when evoked by bash scripts.