开发者

qstring white space

  QString fe = "C:\\Program Files\\Autodesk\\May开发者_JAVA百科a2008\\bin\\imconvert.exe "; 

This line gives a problem because of space between Program and Files. How is it possible to decode it so that it is treated as one complete string

Brgds,

kNish


You can use a QFileInfo object to store it. This object accepts all path even if they have spaces. In addition you have some functions to do all checks you need before using it.


Use QUrl::toPercentEncoding static method


In windows you would do:

QString fe = "\"C:\\Program Files\\Autodesk\\Maya2008\\bin\\imconvert.exe\""; 
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜