vendredi 25 mars 2016

Is there way to load sqlite database from resource in QML?

I did databese using DB Browser, I really enjoy it, but I don't know how to load it in QML, I know how to create new db with table at appdata/local/appname/qml/db, but I don't know how to load my db from resources, can someone tell me? I only found it:

var db = LocalStorage.openDatabaseSync("QQmlExampleDB", "1.0", "The Example QML SQL!", 1000000);

And It's working, but if I want to load my db

var db = LocalStorage.openDatabaseSync("food.db", "1.0", "The Example QML SQL!", 1000000);

It's not working, why?

Aucun commentaire:

Enregistrer un commentaire