Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[solved] sqlite database location
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.
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
Thank you, that's a start.
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.
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
Oh good grief !!!!
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 :)