Skip to content

Instantly share code, notes, and snippets.

@Alir3z4
Created January 29, 2012 20:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Alir3z4/1700559 to your computer and use it in GitHub Desktop.
Save Alir3z4/1700559 to your computer and use it in GitHub Desktop.
const std::map<std::string, std::string> fromQMap(const QMap<QString, QString> &q_map)
{
std::map<std::string, std::string> std_map;
QMap<QString, QString>::const_iterator i = q_map.constBegin();
while (i != q_map.constEnd()) {
std_map.insert(std::pair<std::string, std::string>(i.key().toStdString(), i.value().toStdString()));
}
return std_map;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment