Strikes from Alan Lee and Jon Walters ended Town's six match goal drought and gave Jim Magilton's side a first win in six League games.
Lee headed in on 26 minutes from Gary Roberts' cross with Walters adding a second after the break with his first goal for the Club.
Rangers got a lifeline with 20 minutes left, Paul Furlong scoring from close range but Blues held on for three vital points.
Walters partnered Lee in attack, Francis Jeffers starting on the bench after arriving on loan from Blackburn on Friday.
QPR started the better and had a flurry of chances in the opening minutes, Lee Cook's free-kick pushed away for a corner by Lewis Price, Gareth Ainsworth then appealing for a penalty after hooking the ball against David Wright.
Seconds later Ray Jones flashed a header just wide of the far post following a short corner as Town struggled to get a foothold in the game.
Owen Garvan wasted a free-kick on the edge of the Rangers' box after Lee had been fouled by Danny Cullip as Blues began to make in-roads into the opposition's half.
Roberts then fired over with a gilt-edged chance from 12 yards after exchanging passes with Roberts.
Jaime Peters had too much pace for Sampsa Timoska down the Town right and twice left his marker to cross, Damion Stewart in the right place to clear.
Peters then sent a left foot volley into the sidenetting while at the other end, Steve Lomas cut inside and sent a shot just wide of Price's goal.
Lee's surging run down the right set up a chance for Roberts, who sent the ball back into the area when a shot may have been on.
Alex Bruce thought he had scored on 25 minutes, his header set for the bottom corner until Lee Camp threw himself to his left to palm the ball away.
A minute later Town got the vital breakthrough, Lee's header from Roberts' cross giving Camp no chance.
The impressive Cook carried the main threat for Rangers and his trickery and pass set up a chance for Martin Rowlands but the striker couldn't beat Price with his left foot shot from close range.
Ainsworth had a shot blocked by Bruce inside the box while at the other end, Lee hooked the ball over after Walters had challenged with Stewart, the defender appearing to handle the ball at one stage.
Lee went close again after great work by Harding, the striker's shot brilliantly turned over by Camp as Town threatened a second before the break, Walters then testing the Rangers' 'keeper from 35 yards with a bullet strike.
Camp was again in action early in the second-half, punching away a Jason De Vos header, Walters then spinning and testing Camp from 30 yards with a volley.
The 'keeper was beaten on 54 minutes though, Walters getting on the scoresheet that his play deserved after taking a pass from Roberts and easing the ball through the 'keeper's legs.
John Gregory made his first change just past the hour, Paul Furling replacing Ainsworth, the veteran striker joining Jones in attack.
Walters was a willing runner for the Town midfield, taking a pass from the impressive Garvan and testing Camp with a vicious shot beaten out by the 'keeper.
Rangers forced their way back in the game though on 70 minutes, Rowlands' shot from the angle of the area cannoning back off the inside of the post and Furlong pouncing on the rebound.
Jeffers replaced Walters soon after, the debutant receiving a warm welcome from the Town faithful, who also showed their appreciation for Walters' efforts.
Chelsea loanee Jimmy Smith entered the fray for the last 10 minutes, replacing Lomas as QPR adopted a three man attack, Danny Haynes coming on for Peters.
Haynes was immediately into the action setting up fellow substitute Jeffers with a short pass, the former Arsenal striker denied by Camp's outstretched hand.
Jones picked up the first booking of the game in the final minute for a late tackle on Harding, the Town full-back then going into referee Rob Lewis' notebook for a foul on Rowlands.
Four minutes of added on time saw Furlong dragging a shot wide from eight yards, while Camp held firm under Lee's cross before referee Lewis' final blast on the whistle.
Town: Price, Wright, De Vos, Bruce, Harding, Peters(Haynes 83), Garvan, Legwinski, Roberts, Lee, Walters (Jeffers 71). Subs not used: Supple, Richards, O'Callaghan. Booked: Harding.



















