QStringList strList;
strList << "1" << "2" << "3" << "4";QString str = strList.join("-");qDebug()<<str;-----------------------------------输出:"1-2-3-4"