The best way to do this is to use qDeleteAll(...):
qDeleteAll( map ); // deletes all the values stored in "map"
map.clear(); // removes all items from the map
qDeleteAll(...)
can be used on all of Qt's containers. This way you don't need to worry about a loop nor worry about deleting items individually.