Qt5 escape spaces in path

There are two possible ways. You can either use escaped quotes (inserting the string between quotes) :

QStringList arguments;
QString str=""/home/user/.wine/drive_c/users/user/Local Settings/LocalLow/A B C/test/test1"";
arguments.append(str);

Or use the QStringList() overload of start which does the escaping automatically.

原文地址:https://stackoverflow.com/questions/27805585/qt5-escape-spaces-in-path

原文地址:https://www.cnblogs.com/liujx2019/p/10309871.html