Brazilian Anderson de Silva grabbed the winner to give Barnsley their first home win of the year and smash QPR's flickering hopes of the play-offs.
In an error-riddled opening Barnsley might have claimed an early lead when Michael Mifsud hit a sweet shot on the turn but was off-target.
And when Rangers gifted the home side a free-kick in a dangerous area Hugo Colace's poor attempt was straight at the QPR wall.
Livewire winger Wayne Routledge gave the visitors a boost using his pace and trickery down the right and a dangerous cross from the youngster surprised Dexter Blackstock, whose hasty effort was straight at the keeper.
And when Heidar Helguson headed down Blackstock squeezed off a crisp shot but drilled it wide.
Barnsley swept ahead with a slick goal created and scored by their Maltese duo after 26 minutes.
Mifsud found space on the left and aimed a pinpoint cross for the far post where countryman Bogdanovic was waiting unmarked to guide a smart header inside the post for his second goal for the club.
The lead lasted just nine minutes when Rangers produced a carbon copy strike to level.
Matteo Alberti showed a neat touch on the left and his super cross found Damien Delaney, whose cool header deceived keeper Heinz Muller.
But two minutes before half-time the Tykes earned second goal when de Silva's persistence paid off.
His first shot was blocked by Kaspars Gorkss, but the Brazilian saw the opportunity when the ball dropped for him again in the area and he lashed a low shot to reclaim the advantage.
Barnsley might have stretched their advantage in the second half when Adam Hammill went on a searing run into the area, but was blocked out and twice when Mifsud had shots blocked.
And in a later high-energy spell Rangers stepped up the pace but failed to produce an equaliser to salvage a point.