Skip to content

Instantly share code, notes, and snippets.

@zester
Created September 1, 2011 09:01
Show Gist options
  • Save zester/1185753 to your computer and use it in GitHub Desktop.
Save zester/1185753 to your computer and use it in GitHub Desktop.
Parse a .desktop file with Qt
QSettings settings("/home/steven/Desktop/dolphin.desktop", QSettings::IniFormat);
settings.beginGroup("Desktop Entry");
qDebug() << settings.value("Name").toString();
qDebug() << settings.value("Exec").toString();
qDebug() << settings.value("Icon").toString();
qDebug() << settings.value("Type").toString();
// Defect cant git list
qDebug() << settings.value("Categories").toString();
qDebug() << settings.value("GenericName").toString();
qDebug() << settings.value("Terminal").toString();
qDebug() << settings.value("MimeType").toString();
settings.endGroup();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment