Three second-half goals ended Rotherham United's three-match winning run at AESSEAL New Stadium.
The Millers had dominated the first half, but QPR struck in the 52nd and 54th minutes and in time added on to secure their first Championship victory under Jimmy Floyd Hasselbaink.
First, Junior Hoilett ran through on the left and rolled the ball across goal and into the net, then Matt Phillips smacked home the second from inside the area.
Sebastian Polter wrapped things up in the 92nd minute with a tap-in.
Rotherham pressed after the visitors' two-goal salvo but couldn't force their way back into the game. When Joe Mattock's dangerous ball in from the left was superbly cleared by Grant Hall with substitute striker Jonson Clarke-Harris inches from applying a touch in the 81st minute, their chance was gone.
The Millers, unchanged from Tuesday's 2-0 triumph over Brighton, had produced a first-half display as good as anything seen at New York this season against the West Londoners.
In a terrific opening spell, Danny Ward, Matt Derbyshire, twice, and Aimen Belaid all threatened. Four corners in the first eight minutes told their own story.
Belaid had a shot blocked in a goalmouth scramble after 18 minutes and 11 minutes later Paul Green's curling 18-yarder rattled the QPR post, with Derbyshire's follow-up kept out by Nedum Onuoha's challenge.
The goal the Millers deserved almost came six minutes before the break but Danny Ward's powerful header from Shay Facey's cross was just wide.
They went in at the break knowing they should have been in front, and their lack of first-half reward was to haunt them after the interval as Hasselbaink's men stepped up several gears.
Rotherham United (4-4-2): Camp; Facey, Broadfoot, Belaid, Mattock; G Ward (Clarke-Harris 55), Smallwood, Green, Newell; D Ward, Derbyshire (Ledesma 80). Cairns, Collins, Wood, Richardson, Thorpe.
QPR (4-2-3-1): Smithies; Perch, Hall, Onuoha, Konchesky; Henry, Luongo; Phillips (Chery 87), Hoilett (Mackie 87); Fer; Polter. Subs not used: Lumley, Angella, Petrasso, Sandro, Tozser.
Goals: Hoilett 52, Phillips 54, Polter 90+1 (QPR).
Referee: James Adcock (Nottinghamshire).
Attendance: 9,594 (1,286).