Grant Ward’s fifth goal of the season sent Town on the way to a convincing win at Portman Road.
The summer signing from Tottenham found the net with a left foot finish early on after Rangers failed to deal with a free-kick.
Bart Bialkowski kept Blues’ lead intact with a great save from Conor Washington before the break, then a mistake by Alex Smithies gifted a goal to Luke Varney early in the second-half.
Tom Lawrence added a third soon after and Town could have had more with Smithies saving well from both McGoldrick and Ward.
Town made three changes to the side that went down against Forest last weekend, with Adam Webster back from injury and Jonathan Douglas and Varney handed starts.
Tjaroon Chery fired high and wide from the angle in the game’s first opening after Bart Bialkowski had punched clear from a Jake Bidwell cross.
Bialkowski was quick off his line to smother the danger from Chery before Town got the breakthrough on 13 minutes, Lawrence’s free-kick was punched clear by Smithies,
Ward picked up the loose ball on the edge of the box and after seeing his first shot blocked, his follow up found its way into the bottom corner.
Ward was next in action at the other end, clearing from Bidwell’s cross, then brilliant work by Cole Skuse prevented Conor Washington converting Chery’s cross.
Chery swivelled away from his marker 20 yards out but sent a left footer over the bar, Christophe Berra then throwing himself at Lawrence’s excellent free-kick but the ball was diverted harmlessly wide.
It needed a fantastic save from Bialkowski to keep Town ahead just past the half hour, the ‘keeper denying Washington from point blank range.
Good work by Karl Henry in the middle of the park allowed space for Nedum Onuoha to strike at goal but his shot lacked power as Rangers pressed for an equaliser before the break.
Ian Holloway’s side breathed a sigh of relief on the stroke of half-time though when James Perch, who had already been booked, evaded another yellow after catching Jonas Knudsen late.
Onuoha cleared from McGoldrick’s dangerous cross as the second-half got underway, Bialkowski saving low down from Jordan Cousins at the other end.
Douglas was crowded out inside the Rangers box as he tried to force home Lawrence’s free-kick, before Town were gifted a second goal on 53 minutes, Smithies failing to deal with a long ball and Varney gleefully accepted the invitation to score.
Skuse tested Smithies with a volley from 25 yards before Rangers made two changes, Perch and Sebastian Polter replaced by Sandro and Idrissa Sylla.
Blues wrapped up the points just past the hour, Skuse’s shot falling into Lawrence’s path and the Wales international made no mistake with a calm finish.
Bialkowski held firm to save from Washington, Rangers making a final change with Yeni Ngbakoto on for Cousins. Freddie Sears also entering the fray, replacing Varney.
Lawrence was inches away with another vicious in-swinging free-kick, the ball beating everyone and gliding just past the far post, then McGoldrick was off target with a right footer from a Town breakaway.
Sandro hit the post with a header as Rangers searched for a lifeline but Town always looked capable of a fourth goal with McGoldrick, Sears and Ward all denied by Smithies late on.
Town: Bialkowski, Knudsen, Chambers, Berra, Webster, Skuse, Douglas, Ward, Lawrence (Best 81), Varney (Sears 68), McGoldrick. Subs not used: Gerken, Emmanuel, Bru, Bishop, Williams. Booked: Lawrence
QPR: Smithies, Bidwell, Hall, Onuoha, Lynch, Cousins (Ngbakoto 67), Washington, Chery, Polter (Sylla 59), Henry, Perch (Sandro 59). Subs not used: Ingram, Wszolek, El Khayati, Shodipo. Booked: Perch, Chery, Onuoha.
Att: 16, 510