How to get file path from fileurl in qt android

  • I am working on qt 5.14.1 with ndk version 21 and sdk version 28. I want to open a kml file using file dialog in qt android. I get a fileurl from file dialog like this,


    but I didnt know how to convert this url into simple path and read the data from file. Please tell me how can I convert this url into proper android path.

  • @HemantSuryawanshi
    I don't know anything about Android, but did you try passing that string to QFile() directly? Or, what about via QString QUrl::toLocalFile() const? Just a thought, may not help....

  • @JonB yes I tried but its giving message that the file is not found.