QStringList list{"old_string1", "old_string2", "old_string3"}; list.replaceInStrings("old_string", "new_string");
QStringList list{"a1b", "c2d", "e3f"}; list.replaceInStrings(QRegExp("[0-9]+"), "4");This code will replace all numerical substrings in "list" with "4". This function can also be used to replace regular expressions, as can be seen in this example. Package library: QtCore.