Important: Please read the Qt Code of Conduct -

Maintaining the list of downloads

  • Hi,

    I am using qt5.7.

    I want to maintain an list which is downloaded, Ex: list of maps. The details like title,size,createddate, modified date etc., At some frequency, I have to check the downloaded items compares the last modified date with server.
    Should I maintain the XML to store the map details or I should use QSettings?

    Thanks In advance

  • Lifetime Qt Champion


    You should add more context about these data you want to download. What are you trying to achieve ?

  • Hi @SGaist ,

    Thanks for the reply.

    We have list of maps in our server, Basically the app will show the list of maps and allows to user to select the maps and download it in his mobile. At constant frequency say for once in 15 days, The app will connect with the server and check any updates available for the stored map in the mobile. If so, It will gives a message to user. So my plan is to maintain an list of maps in xml. Pls suggest if have any other way.

  • Moderators

    @Mathan-M If the list is not too complicated then you can use XML or perhaps a JSON format. Otherwise IMO a local database (SQLite) would be much easier to maintain. Most mobile OS's have built-in support for this.

  • Lifetime Qt Champion

    You could also consider JSON to store the data.

    But don't use QSettings for that, it's not its role.

    Shouldn't you rather have a version number in your list of maps and check that rather than starting to do content comparison ? That would make it easier to handle everywhere.

  • Hi @SGaist ,

    Yes, I am maintaining the version in the xml file to compare the latest version maps are available.

    Thanks for the reply.

Log in to reply