Since we are given that
$f(x + y) = f(x) + f(y), \; \forall x, y \in \Bbb R, \tag 1$
to establish $\Bbb Q$-linearity we need only show that
$f(\alpha x) = \alpha f(x), \; \forall \alpha \in \Bbb Q; \tag 2$
we note to begin that
$f(0) = f(0 + 0) = f(0) + f(0) \Longrightarrow f(0) = 0; \tag 3$
suppose now that
$\alpha = \dfrac{p}{q}, \; p, q \in \Bbb Z; \tag 4$
trivially,
$f(1x) = f(x) = 1f(x), \; \forall x \in \Bbb R; \tag 5$
also, (1) immediately yields
$f(2x) = f(x + x) = f(x) + f(x) = 2f(x); \tag 6$
now suppose that there is some
$k \in \Bbb N \tag 7$
such that
$f(kx) = kf(x), \; \forall x \in \Bbb R; \tag 8$
then
$f((k + 1)x) = f(kx + x) = f(kx) + f(x)$
$= kf(x) + f(x) = (k + 1)f(x); \tag 9$
we thus see by induction that
$f(px) = pf(x), \; \forall p \in \Bbb N; \tag{10}$
furthermore with $p \in \Bbb N$,
$f(px) + f(-px) = f(px + (-px))$
$= f(px - px) = f(0) = 0, \tag{11}$
from which
$f(-px) = -f(px) = -pf(x); \tag{12}$
from (3), (10) and (12) in concert we infer that
$f(px) = pf(x), \; \forall p \in \Bbb Z; \tag{13}$
by virtue of this equation we also have, for
$0 \ne q \in \Bbb Z, \tag{14}$
$qf\left ( \dfrac{1}{q}x \right ) = f\left (q \dfrac{1}{q}x \right )$
$= f\left (\dfrac{q}{q}x \right ) = f(1x) = f(x), \tag{15}$
and so
$f \left (\dfrac{1}{q}x \right ) = \dfrac{1}{q}f(x); \tag{16}$
finally, (4), (13) and (16) together yield
$f(\alpha x) = f \left(\dfrac{p}{q} x \right )$
$= pf \left (\dfrac{1}{q} x \right ) = \dfrac{p}{q} f(x) = \alpha f(x); \tag{17}$
(1) and (17) together imply that $f(x)$ is $\Bbb Q$-linear, for with
$\alpha, \beta \in \Bbb Q \tag{18}$
we have
$f(\alpha x + \beta y) = f(\alpha x) + f(\beta y) = \alpha f(x) + \beta f(y), \tag{19}$
the very definition of $\Bbb Q$-linearity.
We close with the observation that $\Bbb Q$-linarity implies (1) simply by setting
$\alpha = \beta = 1. \tag{20}$
Thus (1) is logically equivalent to $\Bbb Q$-linearity. $OE\Delta$.