Andre Gray’s first-half goal gave QPR a deserved victory.
Gray slotted past former R’s keeper Alex Smithies after collecting Andre Dozzell’s superb defence-splitting pass.
It was the striker’s third goal since his arrival on loan from Watford and lifted Mark Warburton’s side to fifth in the Championship table.
It also maintained their record of being the only team in the division to have scored in every league game this season.
They were fairly comfortable against a struggling Cardiff side which has lost seven in a row at home, scoring just one goal during that awful run.
Lyndon Dykes had a couple of chances to add a second as Rangers continued to threaten.
QPR: Dieng; Dickie, Dunne, Barbet; Adomah, Dozzell (Amos 83), Johansen, Odubajo; Chair (Ball 78); Dykes, Gray (Austin 54).
Subs not used: Archer, Kakay, Thomas, Duke-McKenna.