Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

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

    General and Desktop
    2
    2
    769
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Mohammad Kanan last edited by Mohammad Kanan

      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?

      1 Reply Last reply Reply Quote 0
      • W
        wrosecrans last edited by

        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

        1 Reply Last reply Reply Quote 4
        • First post
          Last post