a continuous bjiective map which is not a homeomorphism

Is there a bijective continuous function $f:\mathbb{Q}\rightarrow \mathbb{Q}$ that not a homeomorphism?

I am not able to prove it or disprove it. The problem that the rationals is not even locally compact.

Solutions Collecting From Web of "a continuous bjiective map which is not a homeomorphism"

Yes. Recall that any two countable dense linearly ordered sets without endpoints are order isomorphic, and hence homeomorphic. (See this question for a discussion, or this Wikipedia article for a proof.)

Let $S$ be the subset of $\mathbb{Q}$ consisting of the fractions with odd denominator (in lowest terms), and let $T$ be the complement of $S$. Then $S$ and $T$ are both countable, dense, and have no endpoints.

Let $U = \mathbb{Q}\cap (-\infty,\sqrt{2})$, and let $V = \mathbb{Q}\cap(\sqrt{2},\infty)$. Again, $U$ and $V$ are countable and dense, and have no endpoints.

Let $f\colon \mathbb{Q}\to\mathbb{Q}$ be a function that maps $U$ homeomorphically to $S$, and maps $V$ homeomorphically to $T$. Then $f$ is continuous and bijective, but its inverse is certainly not continuous, so $f$ cannot be a homeomorphism.