With the play-off places out of reach for both teams, managers Neil Warnock and Mark Warburton have an eye on next season and QPR are finishing stronger.
Warburton’s side moved up to 10th despite having to play the final 32 minutes with 10 men after goalkeeper Dieng was dismissed for a professional foul on Duncan Watmore.
Rob Dickie’s 30-yard thunderbolt with quarter of an hour on the clock was followed by Lee Wallace’s first for Rangers since arriving from Scotland almost two years ago.
Those two were enough to secure a sixth win from the last 10 matches despite Yannick Bolasie heading in for Boro in the 28th minute.
Middlesbrough’s frustrations continued having dropped out of contention for a top-six spot in recent weeks and a fifth match without a win left them in danger of slipping out of the top half.
QPR started the stronger of the two even though there was very little for Middlesbrough’s league debutant goalkeeper Jordan Archer to do before the opener.
Archer, signed from Motherwell in January, was beaten from long range in the 15th minute when centre-back Dickie was allowed too much space to roam into in the final third.
And after Darnell Fisher and Djed Spence had got into good positions form the home side, Archer was soon beaten for a second time at the other end.
Striker Lyndon Dykes swivelled in the area before half volleying a cross into the six-yard box for Wallace to nod down and beyond the goalkeeper.
Middlesbrough regrouped and suddenly burst into life in a bid to prevent more disappointment.
When Neeskens Kebano delivered a sweet cross into the penalty area Bolasie leaped to head inside the top corner for his second Middlesbrough goal in consecutive home games.
Five minutes before half-time Middlesbrough should have been level. Watmore picked out Bolasie in the area but, with just the goalkeeper to beat, Dieng somehow stuck a vital foot on the ball as the forward seemed certain to round him.
Dieng suffered an injury in that attack and after receiving lengthy treatment he made a stunning stop just before the break when he dived to thwart Watmore’s header from finding the net.
QPR had more of the ball in the early stages of the second half but Kebano and Stefan Johansen’s off-target shots from distance were all either side had to show before the 58th minute.
But then Dieng was issued with his red card for rushing out of his area to dive into Watmore, who had beaten the offside trap, and Middlesbrough were on the front foot from there.
Dieng’s replacement between the posts, Joe Lumley, was in no mood to be beaten. He made a stunning fingertip save to prevent George Saville from heading in and then another at his near post in the dying stages.
Support The Yorkshire Post and become a subscriber today. Your subscription will help us to continue to bring quality news to the people of Yorkshire. In return, you’ll see fewer ads on site, get free access to our app and receive exclusive members-only offers. Click HERE to subscribe.