QMapscores;
scores.insert("Alice", 90); scores.insert("Bob", 85);
int aliceScore = scores.value("Alice");
for(auto it = scores.begin(); it != scores.end(); ++it){ QString key = it.key(); int value = it.value(); qDebug() << "Key: " << key << ", Value: " << value; }This iterates over all the key-value pairs in the QMap and prints them to the console. These examples are part of the Qt library, which is a cross-platform application development framework.