A week after slumping to a 4-0 derby defeat to Rangers, the Spiders returned to winning ways as their superb recent run of form continued with a 2-1 win at the National Stadium.
Despite falling behind to a Darren Lavery effort, Speirs' side rallied and pulled level thanks to forward Jamie Longworth, before Tony McParland sealed the points with a 30-yard strike.
Michael Keenan saw red for QP while Rangers had Kevin McDonald and Steven Notman ordered off by ref Nick Walsh and boss Speirs said: "I am just relieved to get the win.
"I don't think we played particularly great but the goals were first class in the build-up and the finishing.
"It was important after last week to get the win – and to do it at home."
Victory for the Spiders keeps them well on course for a top-four finish this term as they prepare for this weekend's clash with Peterhead.
Goal hero Longworth said: "It was important to get back on track. We want to be in the Second Division next season and our aim is to reach the play-offs."