Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Replace an element in a QString
i have following problem:
I saved in a QString an XMLStart.
<class="go"> <number>2</number> <column>3</column> <row>4</column>
I want to change for example the value of row with 7 in this String by for example using replace or something like that.
How can i achive that ? Is that possible?
yes its possible if you are careful
or anything that will not replace other strings. so the trick is to see if there is something you can find it with.
if there are multi that matches all will be changed.
If not, then you have to parse the XML and do it more structured.
@mrjj thank you. And how it would look if i want to put a variable instead of 7 in replace? how would be syntax for that?
thank you @jsulm.