Bristol City leave it late to boost promotion bid
City were seconds away from having to settle for a draw in the Championship clash after Niclas Eliasson's effort cancelled out Matt Smith's opener for QPR.
But Famara Diedhiou held his nerve to convert a stoppage-time penalty after Luke Freeman had fouled Josh Brownhill.
It was a ninth successive win for City in all competitions, with their seventh in the league moving them up to fifth in the second-tier table.
There was also a late penalty at the Hawthorns where Jay Rodriguez scored to earn West Brom a 2-2 draw with Nottingham Forest.
A Stefan Johansen own goal gave Forest the half-time lead, only for Jacob Murphy to equalise at the start of the second half.
Ryan Yates restored Forest's advantage in the 65th minute but they were denied victory when Alexander Milosevic fouled Dwight Gayle, allowing Rodriguez to net from the spot for his 17th goal of the season.
Struggling Bolton improved their survival prospects as Callum Connolly's second-half goal gave them a 1-0 victory at Birmingham.
Rotherham staged a spirited fightback at Hull to earn a valuable 2-2 draw in their battle against relegation.
Hull were in control through goals from Jarrod Bowen and Fraizer Campbell, but a second-half reply by Anthony Forde and a Robbie McKenzie own goal saved Rotherham.
Millwall and Sheffield Wednesday played out a dour goalless draw at The Den.