Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[solved]Merge two QStringList elements
AntonZelenin last edited by AntonZelenin
Is there any opportunity to merge two elements of a QStringList?
For example I have list "I", "have", "an", "apple" and i want to make such list: "I have", "an", "apple"
There's no convenience function for that but it's pretty simple nonetheless:
QString temp = stringList.takeAt(i); temp += stringList.takeAt(i) stringList.insert(i, temp);
stringList[i] += stringList.takeAt(i+1);
AntonZelenin last edited by