Barton has received a frosty reception since joining from Newcastle, but he has impressed in recent weeks – and was excellent against the Swans.
The captain shone at both ends of the pitch and fired the relegation-threatened west Londoners ahead on the stroke of half-time, controlling the ball with aplomb before lashing home.
QPR continued to impress in the second half and deservedly doubled their advantage 10 minutes after the restart through Jamie Mackie, whose shot from the edge of the box deflected in off Angel Rangel.
The attacker was marginally offside when he collected the ball for the goal but, given the poor run of fortune QPR have endured in recent weeks, there will be few complaints in west London.
Akos Buzsaky wrapped up victory with a thunderous 25-yard strike that gives the Hoops a two-point cushion over the drop zone and leaves Swansea nursing a fourth successive league defeat.
QPR dominated the opening minutes, with Buzsaky firing an exquisitely-struck volley inches wide from 20 yards.
However, Swansea soon established a foothold on proceedings and began playing their much-vaunted possession football, leading to chants of “boring, boring Swansea”.
QPR were not looking quite as composed on the ball but were looking the more dangerous attacking threat, with Mackie forcing Michel Vorm into a quick reaction save before play was halted for offside.
Swansea’s biggest threat seemed to be from set-pieces and only a goal-line clearance from Barton prevented them breaking the deadlock in the 15th minute.
Gylfi Sigurdsson’s corner from the right was directed goalwards by Steven Caulker and Scott Sinclair looked set to poke home, before Barton intervened.
Vorm held a stinging Adel Taarabt effort, before Mackie collected a lay-off from Bobby Zamora six yards out but shot straight at the goalkeeper.
Clint Hill did superbly to block Sinclair from close range, before QPR had calls for a penalty rejected at the other end.
Buzsaky’s drive appeared to strike Ashley Williams’ elbow, although Lee Probert dismissed the appeals for a spot-kick before Zamora flashed over from the resulting corner.
One minute of stoppage time was added at the end of the first half, which proved just enough time for QPR to break the deadlock.
Taarabt’s free-kick from the right was headed out straight into Barton’s path, who controlled excellently before firing home.
Swansea manager Brendan Rodgers replaced Wayne Routledge and Neil Taylor at the break in a bid to change the game’s dynamics, with Nathan Dyer and Alan Tate coming on.
Aside from a parried Joe Allen effort, though, the visitors struggled to cope with QPR’s tempo and fell further behind in the 55th minute.
Anton Ferdinand played through Mackie, who rolled his marker and saw his left-footed effort from the edge of the box deflect in off Rangel, wrong-footing goalkeeper Vorm.
Mackie appeared to be in an offside position but QPR certainly were not complaining, with their luck continuing three minutes later when Danny Graham failed to prod home with the goal gaping.
The hosts were again counting their blessings in the 61st minute when Hill put a clearing header over his own bar with several Swansea players waiting in the box with intent.
Any doubt over the result was ended in the 67th minute when the ever-impressive Buzsaky collected the ball 30 yards from goal and struck a piledriver past Vorm.
Nedum Onuoha would have joined him on the scoresheet three minutes later but for a late block preventing him turning home after fine work from Zamora.
Taye Taiwo picked up the evening’s first booking in the 72nd minute, before Sigurdsson saw a scissor-kick deflect wide and Samba Diakite entered the referee’s notebook.
QPR spent the majority of the closing stages in Swansea’s half yet could not find a fourth, although they could have grabbed another had Caulker not headed away from danger with substitute Jay Bothroyd lurking at the back post.