Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [solved] sqlite database location
Forum Updated to NodeBB v4.3 + New Features

[solved] sqlite database location

Scheduled Pinned Locked Moved QML and Qt Quick
8 Posts 2 Posters 3.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gleach31
    wrote on 5 Dec 2014, 20:43 last edited by
    #1

    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.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 5 Dec 2014, 22:24 last edited by
      #2

      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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • G Offline
        G Offline
        gleach31
        wrote on 5 Dec 2014, 22:44 last edited by
        #3

        Thank you, that's a start.
        any idea how to get at that via javascript please ?

        1 Reply Last reply
        0
        • G Offline
          G Offline
          gleach31
          wrote on 5 Dec 2014, 23:05 last edited by
          #4

          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.

          1 Reply Last reply
          0
          • G Offline
            G Offline
            gleach31
            wrote on 8 Dec 2014, 10:13 last edited by
            #5

            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.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 8 Dec 2014, 22:43 last edited by
              #6

              Don't you have something like

              @"/Users/username/Library/Application Support/organization_name/application_name/QML/OfflineStorage"@

              ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • G Offline
                G Offline
                gleach31
                wrote on 9 Dec 2014, 09:09 last edited by
                #7

                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.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 11 Dec 2014, 00:45 last edited by
                  #8

                  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 :)

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0

                  1/8

                  5 Dec 2014, 20:43

                  • Login

                  • Login or register to search.
                  1 out of 8
                  • First post
                    1/8
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved