PDA

View Full Version : how to use Qsettings



elDua
5th August 2010, 21:05
I've just started learning Qt, and now I've ran into a problem.
I've looked through the reference documetation, but to be honest, it didn't make much sense to me.

What I'd like to do is use QSettings to store a bunch or URLs. I figure this should not be hard, so I'm asking:

how do I add the urls?
how do I read them into an array or vector?
how do I delete them all?

I'd ask you to not laugh & be specific with answers, considering my lack of knowledge in Qt.

Lykurg
5th August 2010, 21:22
In the detailed description of QSettings you will find how to use it. To write a list see QSetting::beginWriteArray(). There you will also find a sample code. For reading a list back see QSettings::beginReadArray(), also with sample code.

If you want a more specific answer, ask more specific and show us what you have so far.