After Sol Bamba’s header on the stroke of half-time gave City the lead at Loftus Road, second-half strikes from Yeni Ngbakoto and Matt Smith secured a 2-1 win for QPR.
The match quickly developed into an end-to-end contest at Loftus Road, with Kadeem Harris and Junior Hoilett looking particularly lively for the Bluebirds.
City skipper Sean Morrison had the Bluebirds’ first attempt on target, heading downwards into Alex Smithies’ hands. Meanwhile, Harris’ superb cross led to a succession of half-chances for Neil Warnock’s men.
The home side then threatened to strike out of the blue, as Connor Washington broke past the City back-line and fired a low effort against the upright.
QPR soon upped the ante, going close through Sean Goss’ half-volley and several dangerous corners.
However, with half-time looming, City swung the match firmly in their favour as Joe Ralls took aim from distance. His drive was deflected towards the very top corner of the goal, but Smithies somehow palmed it out for a corner.
Craig Noone was the man to swing the ball in, and Sol Bamba rose highest to bullet the ball into the back of the net, giving City the advantage at the interval.
After the break, the Bluebirds began on the front foot, threatening to double their lead on a number of occasions.
Hoilett was robbed of the ball as he was set to pull the trigger at point-blank range, before Kenneth Zohore’s powerful strike soon after was cleared from the goalmouth.
Just after the hour mark, QPR then levelled things up as substitute Yeni Ngbakoto fired a deflected strike into the rood of Allan McGregor’s net.
Both Craig Noone and Hoilett saw curled efforts fly narrowly wide as the Bluebirds looked to claw back the lead at Loftus Road.
However, the hosts struck the crucial goal in the eighty-third minute, as Matt Smith’s header took a cruel deflection off Jazz Richards’ heel and found the City net.
The defeat was the first in five Sky Bet Championship matches for Neil Warnock’s men, who are on the road again to face Blackburn Rovers this Tuesday evening.
FULL TIME: QPR 2-1 CARDIFF CITY