Is there any Qt container that returns its values ​​as a comma separated string?

In Qt, does one of the containers give me the ability to return a comma-separated string from its values?

+4
source share
1 answer

If your elements are QString s, you can use QStringList::join() :

 QStringList list; list << "one" << "two" << "three"; QString s = list.join(","); // s == "one,two,three" 
+12
source

All Articles