QStringList fruits; fruits << "banana" << "orange" << "apple"; fruits.removeOne("orange"); fruits.append("grape");
QStringList months; months << "January" << "February" << "March"; QString joined = months.join(", ");This code creates a QStringList of months and adds three strings to it. It then joins the strings in the list into a single QString, separated by commas and spaces. The resulting QString would be "January, February, March". Package library: Qt Framework.