[solved] sqlite database location
-
wrote on 5 Dec 2014, 20:43 last edited by
I am using Qt on a Mac now, and was wondering where exactly can I find the sqlite database successfully created with LocalStorage.openDatabaseSync ?
On Windows I found it in Users\User\AppData\Local\Qt Project\QtQmlViewer\QML\OfflineStorage\Databases where half of those folders were "hidden", and with the friendly name a2998f7c243edb1cb69267c3c137616c.sqlite
I'm new to the Mac, and have spent ages looking for something similar, or anywhere it might have put it.
Are there hidden folders on the Mac I should track down ? Searching the entire machine for any file like .sqlite shows nothing. And yet the database is being created. -
Hi,
You should be able to get the path using "QQmlEngine::offlineStoragePath":http://qt-project.org/doc/qt-5/qqmlengine.html#offlineStoragePath-prop
Hope it helps
-
wrote on 5 Dec 2014, 22:44 last edited by
Thank you, that's a start.
any idea how to get at that via javascript please ? -
wrote on 5 Dec 2014, 23:05 last edited by
I would expect, on OS X, for it to be in users/username/library/Application Support where all the other applications write their data. Qt doesn't seem to do this, so I'm assuming that Qt, or at least the installation process, isn't quite out of beta yet.
-
wrote on 8 Dec 2014, 10:13 last edited by
I have made some progress with this.
It turns out that it can't create the database file, due to permissions and/or the folder it wants not existing. This problem has been reported in this forum elsewhere.In fact, because it couldn't open the file, instead it built the database in RAM, and continued to add records until the application ran out of memory.
Qt was installed on a brand new Mac. If, as a result of this installation, a simple app falls over due to incorrect configurations, then this is the fault of the installer, not the customer.
We will wait until there is a fix before proceeding with a commercial licence.
-
Don't you have something like
@"/Users/username/Library/Application Support/organization_name/application_name/QML/OfflineStorage"@
?
-
wrote on 9 Dec 2014, 09:09 last edited by
Oh good grief !!!!
http://helpx.adobe.com/x-productkb/global/access-hidden-user-library-files.html
So I need to retract my complaint about Qt. All is forgiven.
In fact, from what I have seen so far, I'm actually impressed with most of Qt
Thanks for pointing me in the right direction.
-
You're welcome !
That's what Qt does ;)
Since you have it working now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)
1/8