4. If the inequality $a x^{2}+7 x-1>2 x+5$ holds for -1 $\leqslant a \leqslant 1$, then the range of $x$ is ( ).
(A) $2 \leqslant x \leqslant 3$
(B) $2<x<3$
(C) $-1 \leqslant x \leqslant 1$
(D) $-1<x<1$
4. B.

From the problem, we know that the inequality $a x^{2}+7 x-1>2 x+5$ holds for $-1 \leqslant a \leqslant 1$, which means the inequality about $a$, $x^{2} a+5 x-6>0$, holds for $-1 \leqslant a \leqslant 1$.
Let $g(a)=x^{2} a+5 x-6$. Then
$g(-1)=-x^{2}+5 x-6>0$,
$g(1)=x^{2}+5 x-6>0$.
Solving these, we get $2<x<3$.