Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt Web assembly support for SQLite database - only :memory: DB
Forum Update on Monday, May 27th 2025

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

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 1.1k Views
  • 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 Offline
    M Offline
    Mohammad Kanan
    wrote on 8 Sept 2018, 00:43 last edited by Mohammad Kanan 9 Dec 2018, 10:21
    #1

    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
    0
    • W Offline
      W Offline
      wrosecrans
      wrote on 8 Sept 2018, 04:48 last edited by
      #2

      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
      4

      1/2

      8 Sept 2018, 00:43

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved