You mean like so?
Based on the stackoverflow link
QDir.toNativeSeparators(QUrl(val).path())
is what i needed
where val is selectedFile from FileDialog's onAccepted
(not sure if it's crossplatform, but in the end it doesn't really matter to me, mostly wanted to get rid of the file:/// notation somewhat the right way)