Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Best way to store changeable data. Which one?
Forum Updated to NodeBB v4.3 + New Features

Best way to store changeable data. Which one?

Scheduled Pinned Locked Moved Solved General and Desktop
11 Posts 6 Posters 1.2k Views 3 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.
  • mrjjM Offline
    mrjjM Offline
    mrjj
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi
    what would "theirs private data" be ?
    like documents and images etc or ?

    B 1 Reply Last reply
    2
    • mrjjM mrjj

      Hi
      what would "theirs private data" be ?
      like documents and images etc or ?

      B Offline
      B Offline
      bogong
      wrote on last edited by
      #3

      @mrjj Mostly settings, but binary data or files might be too.

      1 Reply Last reply
      0
      • B bogong

        Hello all!
        I am choosing solution for my application which require me to store some portion of information on disk. Which way is better in Qt:

        • similar to conf-files like text (key-value pairs)
        • CSV and model definition
        • XML
        • JSON
        • Private instance of SQLITE DB

        Real world case looks like: you have few users and you need to store theirs private data and settings for the Application UI for example. All of ways above is the solution, but which is better. Need argumented point of view.

        J.HilkJ Offline
        J.HilkJ Offline
        J.Hilk
        Moderators
        wrote on last edited by
        #4

        @bogong how private is private ? most of what you posted is human readable text format !?

        If it can be readable I would say QSettings - with ini-format - it has the most robust and easy to use API.


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        B 2 Replies Last reply
        2
        • J.HilkJ J.Hilk

          @bogong how private is private ? most of what you posted is human readable text format !?

          If it can be readable I would say QSettings - with ini-format - it has the most robust and easy to use API.

          B Offline
          B Offline
          bogong
          wrote on last edited by bogong
          #5

          @J.Hilk There are two types of information might be:

          • public, mostly application settings related to user
          • private like private/encrypted that is personal user data

          *** For the second point after experiments I would use encrypted SQLite. But I am not sure about it right now.

          1 Reply Last reply
          0
          • J.HilkJ J.Hilk

            @bogong how private is private ? most of what you posted is human readable text format !?

            If it can be readable I would say QSettings - with ini-format - it has the most robust and easy to use API.

            B Offline
            B Offline
            bogong
            wrote on last edited by
            #6

            @J.Hilk BTW - is there option to encrypt *.ini settings file by in-box solution from Qt?

            J.HilkJ 1 Reply Last reply
            0
            • B bogong

              @J.Hilk BTW - is there option to encrypt *.ini settings file by in-box solution from Qt?

              J.HilkJ Offline
              J.HilkJ Offline
              J.Hilk
              Moderators
              wrote on last edited by
              #7

              @bogong
              well, there is for example QCryptographicHash

              but it's not build into QSettings, you would have to apply that yourself in-between.


              Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


              Q: What's that?
              A: It's blue light.
              Q: What does it do?
              A: It turns blue.

              1 Reply Last reply
              2
              • C Offline
                C Offline
                CroCo
                wrote on last edited by
                #8

                Store them in a reliable database.

                1 Reply Last reply
                1
                • Kent-DorfmanK Offline
                  Kent-DorfmanK Offline
                  Kent-Dorfman
                  wrote on last edited by Kent-Dorfman
                  #9

                  I do mostly JSON based config files these days. Before that I often used XML, but it's usually too heavy-weight for my needs. If you are partitioning your system correctly (with discrete user logins) then each user's data can easily be isolated anyways.

                  1 Reply Last reply
                  1
                  • B bogong

                    Hello all!
                    I am choosing solution for my application which require me to store some portion of information on disk. Which way is better in Qt:

                    • similar to conf-files like text (key-value pairs)
                    • CSV and model definition
                    • XML
                    • JSON
                    • Private instance of SQLITE DB

                    Real world case looks like: you have few users and you need to store theirs private data and settings for the Application UI for example. All of ways above is the solution, but which is better. Need argumented point of view.

                    beeckscheB Offline
                    beeckscheB Offline
                    beecksche
                    wrote on last edited by
                    #10

                    @bogong

                    Here is a simple en/decryption class based in Qt: https://wiki.qt.io/Simple_encryption_with_SimpleCrypt

                    If QSetting is not applicable I'd use YAML: https://github.com/jbeder/yaml-cpp

                    1 Reply Last reply
                    1
                    • B Offline
                      B Offline
                      bogong
                      wrote on last edited by
                      #11

                      I've made my decision. SUPER-MEGA-HUGE (SMH) thanks to all of you. I decided to use SQLite encrypted DB and specially adjusted class for it.

                      1 Reply Last reply
                      1

                      • Login

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