I know projective modules over $\mathbb{Z}$ are those that are free. I know both $\mathbb{R}$ and $\mathbb{Q}[i]$ are not free as $\mathbb{Z}$-modules, so the result follows.
However, I'd like to know why both $\mathbb{R}$ and $\mathbb{Q}[i]$ fail to satisfy the following definition:
A module $P$ is projective if and only if for every surjective module homomorphism $f : N \to M$ and every module homomorphism $g : P → M$, there exists a homomorphism $h : P → N$ such that $fh = g$.
For $P=\Bbb{Q}[i]$ I would try the following. Let $M=P$ and $g$ be the identity mapping. Let $N$ be the free $\Bbb{Z}$-module with generators $x_k,y_k$ indexed by $k\in\Bbb{Z}_{>0}$. Let $f:N\to M$ be the homomorphism uniquely determined by $f(x_k)=1/k!$, $f(y_k)=i/k!$.
Then $f$ is surjective, but there is no splitting homomorphism $h:P\to N$. This follows from the following
Fun fact. Let $f:P\to N$ be a homomorphism of $\Bbb{Z}$-modules. Further assume that $N$ is free with basis $\{x_i\mid i\in I\}$ and that $P$ is divisible (i.e. for all $p\in P$ and all integer $n>0$ there exists an element $r\in P$ such that $nr=p$). Then $f$ is necessarily the constant map to zero.
Proof. Assume that $f(p)\neq0$ for some element $p\in P$. Then $$f(p)=\sum_i a_i x_i$$ such that only finitely many of the coefficients $a_i$ are non-zero. Let $n$ be an integer larger than the absolute value of all the coefficients, $n>|a_i|$ for all $i$. Then we see that $f(p)\notin n N$. But there exists an element $r\in P$ such that $nr=p$. Hence we should have $f(p)=f(nr)=nf(r)\in n N$ contradicting the above. QED.
This has as a more general corollary that a divisible $\Bbb{Z}$-module $P$ cannot be projective - settling both your examples. We just need to use a large enough free module in place of $N$. One with basis indexed by all of $P$ will do.