The answer is yes, and it follows from two observations:
Observation 1: $Q$ is a retract of $\textrm{Hom}(P,Q)$.
Proof: Fix $p^\ast\in P$ and define $r:\text{Hom}(P,Q)\to Q$ by $f\mapsto f(p^\ast)$. It's easy to see that $r$ is order-preserving. Moreover, define $e:Q\to \text{Hom}(P,Q)$ by $q\mapsto c_q$ where $c_q:P\to Q$ is the constant $q$-function. We verify that $r\circ e = \textsf{id}_Q$.
Observation 2: If $L$ is a lattice and $P$ is a poset that is a retract of $L$, then $P$ is a lattice.
Proof: Suppose $e:P\to L$ and $r:L\to P$ are order-preserving maps with $r\circ e = \mathsf{id}_P$. For $a,b\in P$ it suffices to check that $r(e(a)\vee e(b))$ is the least upper bound of $a,b\in P$. It is clearly an upper bound, so suppose we have $c\in P$ with $c\geq a,b$. We want to show that $c \geq r(e(a)\vee e(b))$. Since $e$ is order-preserving, we have $e(c) \geq e(a), e(b)$ therefore $e(c) \geq e(a)\vee e(b)$. Since $r$ is order-preserving, we get $r(e(c)) \geq r(e(a)\vee e(b))$ and since $r\circ e = \mathsf{id}_P$ we have $c=r(e(c)) \geq r(e(a)\vee e(b))$ which concludes the proof.