开发者

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

开发者 https://www.devze.com 2023-03-01 13:43 出处:网络
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 QStrings, you can use QStringList::join():

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 QStrings, you can use QStringList::join():

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

精彩评论

暂无评论...
验证码 换一张
取 消