且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

用反斜杠空格替换 QString 中的空格

更新时间:2023-02-23 10:41:10

编译器使用 \ 作为字符串中的转义字符.您将需要两个反斜杠.

The compiler uses \ as an escape character in strings. You will need two backslashes.

myPath.replace(" ", "\\ ");