QString 中级使用技巧

http://www.cnblogs.com/onlycxue/archive/2012/10/30/2746902.html

 

将修改路径中的红色单词。

QString path="/home/feeling/test/DP/DataProcessSolution/Target/Tmp/Resource/Configuration/Global";
QString str=path.left(path.indexOf("Global")).append("DataHandler");
qDebug()<<str;
输出:"/home/feeling/test/DP/DataProcessSolution/Target/Tmp/Resource/Configuration/DataHandler" 

 

posted @ 2015-10-19 14:57  gebilaowang  阅读(167)  评论(0编辑  收藏  举报