In this paper, we study a delayed diffusive predator-prey model with nonlocal competition in prey and habitat complexity. The local stability of coexisting equilibrium are studied by analyzing the eigenvalue spectrum. Time delay inducing Hopf bifurcation is investigated by using time delay as bifurcation parameter. We give some conditions for determining the bifurcation direction and the stability of the bifurcating periodic solution by utilizing the normal form method and center manifold theorem. Our results suggest that only nonlocal competition and diffusion together can induce stably spatial inhomogeneous bifurcating periodic solutions.