The result leaves QPR rooted to the foot of the standings with only two points from six games, while West Ham moved into the top seven, with Tottenham and West Brom on 11 points.
Nolan said of the win on Sky Sports 1: "It was absolutely vital. Absolutely delighted with the win today.
"They made us work for the win in the second half. It was a fantastic first-half performance, the second half I thought we dug in and we could have won it by more in the end really."