Steven MacLean struck from the penalty spot to lift the gloom at Hillsborough after the midweek sacking of manager Paul Sturrock.
The Owls, still reeling after the popular Scot lost his job following Wednesday's 4-0 thrashing at Colchester United, swept in to a 2-0 half-time lead through two Marcus Tudgay goals.
Dexter Blackstock hit a second-half double as John Gregory's struggling side bounced back before MacLean kept his cool to tuck away his spot-kick as Wednesday secured only their third Championship win of the season.
The hosts had survived a frantic opening spell as Rangers, inspired by Lee Cook, sliced them apart. The midfielder had a left-foot effort palmed over the top by Brad Jones before his darting run let in Blackstock whose low strike was snapped up by the Wednesday keeper.
Blackstock should have broken the deadlock with Cook again the provider as he produced a diving header from six yards out but the former Southampton striker miscued as Brad Jones comfortable smothered the ball.
The Hillsborough side hit back in the 13th minute with a swift break downfield. Dean Burton threaded the ball to Tudgay who tucked the ball beyond Paul Jones's reach from 15 yards as he registered his first goal of the season.
As the visitors tried to hit back, teenager Ray Jones had a left-foot shot tipped over by the Wednesday keeper before Tudgay snatched his second deep into first-half stoppage time.
He steamed on to a looping John Hills cross before bundling the ball into the far corner of the net from close range.
Blackstock pulled a goal back for QPR in the 50th minute when he ran onto Cook's low cross from the left to sweep the ball past Brad Jones before connecting with another Cook centre to head in from six yards four minutes later.
MacLean, who had replaced the injured Burton, hit the winner in the 69th minute after his darting run into the box was brought to a halt by the Rangers keeper.