Another simple proof:

Because $f$ is continuous and by connectedness, $f([0,1])=[a,b]$ for some $a<b$. Now define $$g : x \mapsto \frac{1}{p} \left(f(x)-q \right), \ \text{where} \ p,q \in \mathbb{Q}.$$

In particular, $g(x)$ is rational iff $f(x)$ is rational, i.e. $g$ has the same property that $f$.

Notice that $g([0,1])= \left[ \frac{a-q}{p}, \frac{b-q}{p} \right]$. Therefore, if $b-1 \leq q \leq a$ and $p \geq b-q$ then $g : [0,1] \to [0,1]$ and classically $g$ has a fixed point $x_0 \in [0,1]$.

Finally we deduce that $x_0 \in \mathbb{Q}$ iff $x_0 = g(x_0) \notin \mathbb{Q}$, a contradiction.