Iterating over a QMap with for

If you want the STL style with first and second, do this:

for(auto e : extensions.toStdMap())
{
  fout << e.first << "," << e.second << '\n';
}

If you want to use what Qt offers, do this:

for(auto e : extensions.keys())
{
  fout << e << "," << extensions.value(e) << '\n';
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)