The patent application relates to new heterocyclic compounds of the general formula (I), in which R, R1, R2, Q, T, n and p have the definitions elucidated in more detail in the description, to a process for preparing them and to the use of these compounds as medicaments, particularly as aldosterone synthase inhibitors.