Catalyzes the transfer of glucose from UDP-alpha-D-glucose (UDP-Glc) to D-glucose 6-phosphate (Glc-6-P) to form trehalose-6-phosphate. Acts with retention of the anomeric configuration of the UDP-sugar donor. Essential for viability of the cells at low temperatures and at elevated osmotic strength. D-glucose 6-phosphate + UDP-alpha-D-glucose = alpha,alpha-trehalose 6-phosphate + H(+) + UDP Activated by potassium and other monovalent cations at 0.25 M, but partially inhibited at greater concentrations (PubMed:3131312). Inhibited by validoxylamine A 6'-O-phosphate (PubMed:20077550). kcat is 34 sec(-1) for glucosyltransferase activity. Glycan biosynthesis; trehalose biosynthesis. Homotetramer. By cold-shock, osmotic-shock and during the transition to stationary phase. Expression is partially dependent on RpoS. Mutants are viable, but osmotically sensitive in minimal media and sensitive to cold shock. Belongs to the glycosyltransferase 20 family.