Accessing Websql Database With Qt

- 1 answer

I'm making a web app and I need to store some data into a database that can also be accessed with Qt. What I need is to insert values from the web app and the app created with Qt.

I'm storing the info that comes from the web app in a WebSql database with javascript in Linux Mint. I wan't to know if it is possible to access that database file with Qt.

Are there a better alternative to do this without a server-side languages?



Yes you can access the websql database with Qt. The websql database is just a sqlite database so there is no problem accessing it with Qt.

The tricks are finding the location and name of the file. In Chrome on my Mac, for example, the database is at

~/Library/Application Support/Google/Chrome/Default/Databases/mysite/1

there is a master database of the other databases at

~/Library/Application Support/Google/Chrome/Default/Databases/Databases.db

It is also sqlite and you can read it to find the other databases.