Qt QString: 如何去除exePath中的/xxx.exe部分
可以使用QString的remove方法来去掉exePath中的/xxx.exe。代码如下:
exPath.remove(exePath.lastIndexOf("/"), exePath.length() - exePath.lastIndexOf("/"));
这样就可以去掉exePath中的/xxx.exe部分。
原文地址: https://www.cveoy.top/t/topic/pxZS 著作权归作者所有。请勿转载和采集!