Query a sqlite database from QML and/or Javascript?
-
wrote on 5 Aug 2018, 21:50 last edited by
Hi! First post!
I'm trying to develop a desktop widget for KDE Plasma using QML. I've got a bunch of text (random quotes and sayings) in a sqlite database.
Is there any way I can query this database?
I know I could write a Qt/C++ backend, but the fact that it needs to be compiled makes distributing it a lot more complicated.
Any suggestions?
-
Hi and welcome to the forums.
There is
http://doc.qt.io/qt-5/qtquick-localstorage-qmlmodule.html
which is pure QML. -
wrote on 6 Aug 2018, 11:18 last edited by
Right, I've studied that. But there's no way to place an existing database into "LocalStorage", is there?
-
Right, I've studied that. But there's no way to place an existing database into "LocalStorage", is there?
@bundito
Hi
Tbh, im not sure, but it seem to work out for this poster
https://forum.qt.io/topic/66567/import-an-external-sqlite-database-to-my-project
1/4