@shokarta try with Android FileDialog
FileDialog {
title: qsTr("Select a File")
fileMode: FileDialog.OpenFile
onAccepted: {
if(selectedFiles.length) {
console.log("we selected: ", selectedFiles[0])
Selected File 'München.pdf' from FileDialog
...this gives you per ex:
content://com.android.providers.downloads.documents/document/32
// you can check from C++ and verify fileUrl:
QFileInfo fileInfo(fileUrl);
qDebug() << "verifying fileUrl: " << fileUrl;
qDebug() << "BASE: " << fileInfo.baseName();
qDebug() << "FileName: " << fileInfo.fileName();
qDebug() << "Path: " << fileInfo.path();
qDebug() << "absoluteFilePath: " << fileInfo.absoluteFilePath();
return fileInfo.exists();
this gives you:
verifying fileUrl: "content://com.android.providers.downloads.documents/document/32"
BASE: "München"
FileName: "München.pdf"
Path: "content://com.android.providers.downloads.documents/document"
absoluteFilePath: "content://com.android.providers.downloads.documents/document/32"
file exists