Not necessarily. Assume that $A\in\mathbb{R}^{n\times n}$ is Hurwitz stable and let $C\in\mathbb{R}^{p\times n}$ be full row rank with $p<n$. Assume further that the pair $(A,C)$ is observable.
Let $Q=C^TC$ and, clearly, the rank of $Q$ is that of $C$ and is equal to $p$. However, the matrix $P$ given by
$$P=\int_{0}^{\infty} \exp(A^Tt) C^TC \exp(At) dt$$
is full rank, i.e. its rank is $n$. This is due to the fact that the pair $(A,C)$ is observable and that $P$ is the observability Gramian in that case.
Edit. In fact, it can be shown that if $Q$ is positive semidefinite, then $\mathrm{rank}(P)\ge\mathrm{rank}(Q)$.