简体   繁体   中英

Accessing Websql database with Qt

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM