Yes, $E$ can be the identity, as anon points out. The dihedral group with $8$ elements and the quaternion group of order $8$ are examples where this happens. Another general set of examples is when $Q$ is an extra-special group of ordr $p^{2n+1}$, $p$ any prime, and $n$ any positive integer. In the case, $Z(Q) = [Q,Q] = \Phi(Q)$ has order $p,$ and these exist for evey $p$ and $n$ (in fact, there is always more than one isomorphism type of extraspecial group of those orders). The existence of extraspecial groups of order $p^{3}$ is easy- we have seen two above when $p = 2.$ For $p$ odd, take (for example), $Q = \langle x,y : x^{p} = y^{p^{2}} = 1, x^{-1}yx = y^{1+p} \rangle$. For general $n,$ take a central product of $n$ extra-special groups of order $p^{3}$. The central product of two groups $A$ and $B$ which each have center of order $p$ may be realised as the direct product, with the "diagonal subgroup" of the two (isomorphic) centers factored out.