There are several options:
1. It looks you are dealing with an ini file.
So you might want to have a look at QSettings, which does all this for you.
2. if for some reason you can't use QSettigns, but you know exactly what you are looking for in the text (meaning, the text is not arbitrary ) you can just use QString::replace()
3. If the text to replace is not fixed, then you can use QRegExp in conjunction with QString.
4. If none of the above helped you, you might want to look QTextEdit facilities, but in contrast to the previous points, its not as little code as the others.
Bookmarks