我使用QSettings编辑.desktop菜单项。我是这样做的: dfile是一个QString绝对文件路径
QSettings set(dfile, QSettings::IniFormat);
qDebug() << "Editing " << set.fileName();
set.beginGroup("Desktop Entry");
// set whatever I need
set.endGroup();但是当保存.desktop文件时,我得到
[Desktop%20Entry]
Encoding=UTF-8
Version=1.0
# and etc.而不是
[Desktop Entry]
Encoding=UTF-8
Version=1.0
# and etc.我做错了什么?谢谢
发布于 2013-02-09 21:36:01
你没有做错任何事。使用HTML URL encoding将空格编码为%20。你可以把设置读回来,对吧?
https://stackoverflow.com/questions/14787972
复制相似问题