With only seven goals in their last seven games the Blues again made hard work of their latest success with took them to the top of the Coca-Cola Championship.
They were indebted to another opportunist goal from veteran striker Kevin Phillips, who notched his fourth goal of the season since his arrival from nearby West Brom.
Phillips, a major player in Albion's successful promotion campaign, was on the mark just 21 seconds before the end of the first half.
It was a killer blow for the visitors, who were unable to mount a serious challenge in the second half of the St Andrews clash.
A relieved McLeish admitted: "The game was much better than the last two home games against Doncaster and Blackpool. I was uneasy in those two games but I felt secure in this match.
"It wasn't a fantastic performance but it was a sleeves rolled up type of game.
"Until we made the switch of Quincy (Owusu-Abeyie) to the right we were never in control - but afterwards we played really well.
"The timing of Phillips' goal just before half-time was absolutely brilliant.
"The first 20 minutes was not very pretty when we didn't retain the ball. As the game progressed I was much happier with our possession.
"For some reason I had a lot of faith in my players in this game and I was very happy with the outcome."
QPR boss Iain Dowie denied he is under any pressure, despite the fact his side have picked up just one point from their last four games.
Dowie admitted he needs more of a cutting edge in attack to enable Rangers to get out of their current poor run.
He said: "We are not firing off enough cylinders but saying that it could be a very different picture with a couple of good results against Swansea and Nottingham Forest.
"The character is in the side. I have no problem. I'm disappointed with the points return in the last four games but that is what this league is all about.
"I was happy with the first half but not the second half.
"I am confident that I will get time to do the job at Rangers. I was reading the other day that we have recently had our best start for 11 years.
"I have seen enough character around the dressing room to get get us out of a difficult run of points.
"You lose games and there always people who want to be negative. I'm not negative. I will just do my job as best I can until I am told otherwise.
"I have a very good relationship with the owners. We have targets and winning performances against Swansea and Nottingham Forest and the whole picture changes."
Dowie had to admit that it was not a game for purists as neither side hit the high notes.
If Birmingham had been half as efficient as the pre-match display of the Royal Marines drummers the Midlands club would have won by a more convincing margin.
In the swirling wind the game hardly got off on the right foot for Birmingham as they had Liam Ridgewell booked for punching a cross from Quincy into the net after only two minutes.
There was a distinct lack of class in midfield where Birmingham struggled to gain the upper hand against a Rangers side which generally played with a great deal more purpose without producing the finishing touch.
Birmingham's only real goal attempt in the first half hour was an optimistic back-header from Kemy Agustien from another Quincy cross, while Rangers were generally the more positive as Gavin Mahon emphasised with a rising drive which went just over the bar.
But with just 21 seconds remaining of the first half Birmingham took the lead when Phillips tapped in O'Connor's centre from close range.