Android QFileDialog returns nothing and code in background keeps running
thorsten2102 last edited by thorsten2102
Hey, i'm trying to open a file on my phone
auto filename = QFileDialog::getOpenFileName(this, "choose file to encode to Base64");
when i debug through the app (which is running on my phone) my standard filedialog opens
while the filedialog is open, it instantly returns an empty string and the code proceeds running, while the filedialog is still open.
when i choose a file or just close the filedialog the app immediately crashes.
when i hardcode a path the file is opended as expected
QString filename = "/storage/emulated/0/Download/testfile.txt";
some people meant that one should write his own filedialog.
i tried this on Android 8.0 and 9.0
I still would like to use the standard filedialog, how can i get the correct path + make the code execution stop until i have chosen a file?
Edit: i'm using QWidgets
mvuori last edited by mvuori
I tried the native dialog in Qt 13.0 and had the same problem. I think it is likely that it just doesn¨t work.