Allardyce told Sky Sports News that he was pleased with the versatility shown by his players to grind out a result.
He said: "I think we showed two sides of our team today. One side was the great first half we gave and the fact that we completely dominated the opposition playing on their own ground.
"A brilliant goal from Adel Taarabt lifted the crowd in the second half and we had to show the other side of our character which is good, honest, solid defending and working hard for each other.
"In the end we got a well deserved victory and but for Julio Cesar's saves we would have won by three or four."
West Ham got their first away win of the season at Loftus Road to climb to seventh in the Premier League with 11 points from their opening six matches.