D-glucose 6-phosphate + UDP-alpha-D-glucose = alpha,alpha-trehalose 6-phosphate + H(+) + UDP Expressed in leaves, roots, stems and flowers. In the N-terminal section; belongs to the glycosyltransferase 20 family. In the C-terminal section; belongs to the trehalose phosphatase family.