Hello! For accessing local files QFileDIalog::getOpenFileContent() is your best option with Qt today. The tradeoff is that it reads the entire file info memory and returns a QByteArray. If you have existing QFile-based code that you want to reuse then you can save that QByteArray to /tmp/ (which is backed by Emscripten's in-memory file system, inside the web sandbox).
JSPI support is in the works. We are also waiting for native browser support, and you do need a somewhat recent Emscripten version. Note that JSPI alone is not sufficient to enable local file access using the standard QFileDialog API, we most likely also need a custom file engine of some sort. Regards, Morten > On 23 Jan 2025, at 18:40, Glen Mabey <gma...@gmail.com> wrote: > > It looks like (in QtPublicToolchainWasmHelpers.cmake) that the official > version of emsdk to use with 6.9 will be 3.1.56 (same as 6.8). > I'm trying (unsuccessfully so far) to get a QFileDialog to pop open from my > QML app. > I have been working to pursue the appropriate JSPI compile options, yet it > seems that it (-sASYNCIFY=2) isn't supported in 3.1.56. > So, I realize that JSPI isn't necessarily going to be supported in 6.9, but > it's apparent (from the references to JSPI in the docs) that y'all are > working towards that destination eventually (but not there yet). > Or, is it just that QtPublicToolchainWasmHelpers.cmake needs to be updated? > If not, then is there an emscripten version that you *have* had good success > with? > > Best Regards, > Glen > _______________________________________________ > Interest mailing list > Interest@qt-project.org > https://lists.qt-project.org/listinfo/interest _______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest