
Originally Posted by
nupul
Why not? The file format is similar as how QSettings would store it, right?
My mistake. The format is no problem at all. But I thought that QSettings would possibly do some assumptions about the path, eg. it's restricted to either $HOME/.config (user scope) or /etc/xdg (system scope) in *nix so you couldn't parse whichever file you want. But that seems not to be the case.
settings.beginGroup("Desktop Entry");
QString exec
= settings.
value("Exec").
toString();
QSettings settings("/home/user/Desktop/.desktop", QSettings::IniFormat);
settings.beginGroup("Desktop Entry");
QString exec = settings.value("Exec").toString();
To copy to clipboard, switch view to plain text mode
Bookmarks