Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    QSettings: maximum value size?

    Mobile and Embedded
    4
    4
    4447
    Loading More Posts
    • 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.
    • Q
      QtQueries last edited by

      Hi

      What's the maximum size of data I could expect to store in a QSettings key/value pair? Is it capped, or does it just depend on device storage space?

      Thanks

      1 Reply Last reply Reply Quote 0
      • G
        giesbert last edited by

        What exactly do you mean by maximum size of data?

        Amount of data in the value?
        Afaik there is no limit, but that might depend, where you store it.
        Default on window sis the registry, that might have some limits. If you store in a file (default on Linux) I think there should be no limits.

        Nokia Certified Qt Specialist.
        Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

        1 Reply Last reply Reply Quote 0
        • A
          andre last edited by

          I think there are limits for the windows registry, actually.

          1 Reply Last reply Reply Quote 0
          • Z
            ZapB last edited by

            If you force QSettings to use the ini file backend then you should be able to store anything that you can fit into a QVariant and have disk/memory space for.

            How practical this is in reality I am not sure. If you have a lot of data it might be better to store the data in a separate file that you can read/write incrementally and then store the filename for that using QSettings. That would give you greater control on how and when the bulky data is read/written.

            Nokia Certified Qt Specialist
            Interested in hearing about Qt related work

            1 Reply Last reply Reply Quote 0
            • First post
              Last post