We consider a class of Schrödinger–Kirchhoff equations in $\mathbb{R}^{3} $ with a general nonlinearity $g$ and coercive sign-changing potential $V$ so that the Schrödinger operator -aΔ+V is indefinite. The nonlinearity considered here satisfies the Ambrosetti-Rabinowitz type condition g(t)t≥μG(t)>0 with μ>3. By Morse theory, we obtain the existence of nontrivial solutions for this problem.