PDA

View Full Version : Maintaining the list of downloads



Mathan
14th September 2016, 12:00
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

anda_skoa
14th September 2016, 13:07
QSettings is probably easier, you could also consider a Sqlite based database file.

Cheers,
_

d_stranz
15th September 2016, 16:02
Should I maintain the XML to store the map details or I should use QSettings?


I previously posted code to read / write QSettings to XML, so you could have the best of both worlds. I don't remember the link to the post - it was about 2 years ago.

Edit: Here. (http://www.qtcentre.org/threads/59733-QMetaType-dynamic-object-creation-and-initialization) I notice there is a small typo where I didn't edit the class name to change from our internal library naming convention, so if you use this replace "CSAQtXMLSettings" with just "XMLSettings" and all will be fine.