The 2-adic rationals $\mathbb{Q}_2$ and the 3-adic rationals $\mathbb{Q}_3$ are homeomorphic, because each one is a countable disjoint union of Cantor sets.  They are also isomorphic as groups if you assume the axiom of choice, because they are both fields of characteristic 0 and therefore vector spaces over $\mathbb{Q}$ (of the same cardinal dimension).  However, the 2-adic integers $\mathbb{Z}_2$ are a compact subgroup of $\mathbb{Q}_2$ in which every element is infinitely divisible by 3.  On the other hand, in $\mathbb{Q}_3$, any non-trivial sequence $x, x/3, x/9, \ldots$ is unbounded in the complete metric, and is therefore not contained in a compact subgroup.