A group is said to be a $Q$-group if the character of any complex representation is rational valued. A well-known internal characterization of $Q$-groups is the following:
$G$ is a $Q$-group if and only if elements which generate the same cyclic subgroup of $G$ lie in the same conjugacy class.
See for example: Corollary 2 to theorem 29 in Serre's Linear Representations of Finite Groups as suggested in https://mathoverflow.net/a/10652/9672, or Kletzing's Structure and Representations of $Q$-groups.
I would be grateful if someone could tell me where this theorem first appears (to whom is it due).