Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt Web assembly support for SQLite database - only :memory: DB



  • I am using qt-everywhere-src-5.11.0-webassembly-tp to compile web application and run on nginx web server, in my application I create SQLite database, when I compile the app for desktop it works normal and database file is created. When project is compiled for Qt web assembly, the applications works normally ... can create new tables, and insert records .. but nothing is saved anywhere.
    I tried to configure Nginx web server locations to access local SQLite DB file but it never works .. this seems Qt web assembly supports only memory SQLite databse .. is there away to access databse file from local file system?



  • WebAssembly doesn't have access to a normal filesystem, so Qt for WebAssembly projects won't be able to write files. You would have to implement database access by doing something like having a separate REST API that your application can use for persistent data.

    https://stackoverflow.com/questions/45535301/can-i-read-files-from-the-disk-by-using-webassembly


Log in to reply