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. QSettings to save data structure
Forum Updated to NodeBB v4.3 + New Features

QSettings to save data structure

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 507 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.
  • forlornF Offline
    forlornF Offline
    forlorn
    wrote on last edited by
    #1

    I am in the process of building a .cbz reader application in Qt.

    When the user opens up a .cbz file, it parses through and saves all of the .png/.jpg images inside of a List data structure in my c++ class.

    When the application starts back up, I want a page that allows them to click a button to continue where they left off in their .cbz file viewing (i.e. they finished on page 56/100 in the previous session).

    It would also be nice to show a thumbnail of the last .jpg image that was viewed on the button they can click to restore a session as opposed to opening up a new one.

    I'm aware that you can use QSettings to maintain things like the size of the GUI screen, but can I also use it to store the List data structure and the index in that list that the user left off on?

    Or will I have to use something like QtSQL?

    Thanks in advance.

    raven-worxR 1 Reply Last reply
    0
    • forlornF forlorn

      I am in the process of building a .cbz reader application in Qt.

      When the user opens up a .cbz file, it parses through and saves all of the .png/.jpg images inside of a List data structure in my c++ class.

      When the application starts back up, I want a page that allows them to click a button to continue where they left off in their .cbz file viewing (i.e. they finished on page 56/100 in the previous session).

      It would also be nice to show a thumbnail of the last .jpg image that was viewed on the button they can click to restore a session as opposed to opening up a new one.

      I'm aware that you can use QSettings to maintain things like the size of the GUI screen, but can I also use it to store the List data structure and the index in that list that the user left off on?

      Or will I have to use something like QtSQL?

      Thanks in advance.

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @forlorn said in QSettings to save data structure:

      I'm aware that you can use QSettings to maintain things like the size of the GUI screen, but can I also use it to store the List data structure and the index in that list that the user left off on?

      yes, when you implement the stream operators for your types you want to store.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      3

      • Login

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