Setting custom local storage Path in QML

1k Views Asked by At

I m trying to put a custom path in QML file but can't get it done.

I'm trying to get de db in a shared folder where i'm willing to put the DB so any person who has the program can acces to data.

I'm using Sqlite and Qt Creator 5.7 but not a lot of info about this.

1

There are 1 best solutions below

0
On

You can simply COPY the database from its default path. Typically that is located (In windows anyways) at

C:\Users\<username>AppData\Local\<program name>\QML\OfflineStorage\Databases

and on Mobile devices it is stored in a similar place --

on android its in a sub folder of:

/data/data/<Program Name>

On *nix it is located:

/home/<user>/.local/share/[ProjectName]/QML/OfflineStorage/Databases