Yes, completing the square would give you (x+ p/2)^2+ q- p^2/4. Now consider three cases:

q- p^2/4= 0

q- p^2/4< 0 and

q- p^2/4> 0

Show that in the first and second cases, the polynomial can be factored with real coefficients but in the third, it cannot.