The theory of almost periodic functions is used to investigate spectral properties of Schrödinger operators on metric graphs, also known as quantum graphs. In particular we prove that two Schrödinger operators may have asymptotically close spectra if and only if the corresponding Laplacians are isospectral. The case of general vertex conditions and integrable potentials is considered. In particular, our result implies that a Schrödinger operator is isospectral to the standard Laplacian on a may be different metric graph only if the potential is identically equal to zero.