This question already has an answer here:
I have a vector shapefile map that is divided into polygons. I want to add two columns to the attribute table with the Eastings/Northings coordinates of each polygon centroid.
So far what I've tried is:
menu > Vector > geom tools > polygon centroids
This gives me the centroids, but as a new layer. What I can't figure out how to do is to merge this layer with the original.
There is a command: menu > vector > join attribute by location.
But what I want is, I guess, 'join by attribute column' or something.