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. QML local storage directory SQLITE
Qt 6.11 is out! See what's new in the release blog

QML local storage directory SQLITE

Scheduled Pinned Locked Moved Solved QML and Qt Quick
10 Posts 2 Posters 2.2k Views 2 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.
  • F Offline
    F Offline
    filipdns
    wrote on last edited by
    #1

    Hello, I would like change the local storage directory from my database but reading docs I don't really understand what I have to do with QQmlEngine::offlineStoragePath()...

    Could you help me?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Call setOfflineStoragePath

      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
      • F Offline
        F Offline
        filipdns
        wrote on last edited by
        #3

        thanks a lot, where I have to put this function?
        what I have to write exactly?

        1 Reply Last reply
        0
        • F Offline
          F Offline
          filipdns
          wrote on last edited by
          #4

          I try QWebEngineSettings::setOfflineStoragePath(E:\database) but I got message "too much arguments"...

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            What does QWebEnigineSettings have to do with the situation at hand ?

            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
            • F Offline
              F Offline
              filipdns
              wrote on last edited by
              #6

              I don't know lol I just copy what qt5.9 docs say to do

              1 Reply Last reply
              0
              • F Offline
                F Offline
                filipdns
                wrote on last edited by
                #7

                If I'm wrong that can explain the error message lol

                1 Reply Last reply
                0
                • F Offline
                  F Offline
                  filipdns
                  wrote on last edited by
                  #8

                  this line in the cpp file make the directory of the local storage next the exe

                  engine.setOfflineStoragePath(".");
                  
                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    That's not a good idea. e.g. Mofile platforms don't allow to write in the same folder as the executable. You should rather use QStandardPaths to retrieve a suitable folder.

                    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
                    • F Offline
                      F Offline
                      filipdns
                      wrote on last edited by
                      #10

                      That is only example to choose other directory just replace the dot by the desired folder path

                      1 Reply Last reply
                      0

                      • Login

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