Northcott's theorem on heights II. The quadratic case