Is there any Qt container that returns its values as comma separated string?
In Qt, does one of the containers give me the option to return a comma-se开发者_运维技巧parated string from its values?
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"
精彩评论