Danny SHittu scored the winner for QPR to provide the perfect tonic for manager Ian Holloway and heap more pressure on Cardiff City boss Lennie Lawrence.
Shittu netted his first goal since April 2003 in the 23rd minute from Kevin Gallen's corner, just after he was forced to change his bloodied shirt following a clash with Alan Lee.
The win was fully deserved by Rangers, who dominated throughout and were unfortunate not to win by a bigger margin.
Defender Shittu protected his side's lead excellently, by beating Cardiff strikers Lee and Joe Ledley to every header in the visitors' box.
And boss Holloway, recovering from a stomach virus, would have wished he'd got out of his sickbed for this game rather than last week's 6-1 mauling at Leeds.
Lee Cook could have doubled QPR's lead three minutes after the break but Cardiff keeper Tony Warner made a diving save to keep the winger's outswinging effort out.
Cook had two more chances midway through the second half, as Rangers kept Cardiff camped in their own half, but fired wide both times.
Then it was Paul Furlong's turn to force Warner into a save, when he latched on to Kevin Gallen's throughball to fire goalward.
Kevin Gallen came close to scoring the opener on 16 minutes, when Furlong laid off Gino Padula's cross, but his shot flew wide.
Cardiff, who have failed to win on the road in over two months, failed to register a shot on target in the entire game.
Darren Williams wasted their best chance of the match on the hour, but shot wide of an open goal when QPR keeper Chris Day was sprawled on the turf.