Android QFileDialog returns nothing and code in background keeps running
Unsolved
Mobile and Embedded
-
Hey, i'm trying to open a file on my phone
"/storage/emulated/0/Download/testfile.txt"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