The Rs led twice in normal time, with Charlie Austin scoring a brace, but they were pegged back each time as first Lucas Digne and then former QPR man Andros Townsend equalised for the top-flight outfit to force a shootout at the end of 90 minutes.
The first seven penalties for each side were convereted, though only after Everton defender Ben Godfrey had been handed a reprieve as Seny Dieng was adjudged to have come off his line when saving his spot-kick.
The England U21 international buried his retake but Dieng then tipped Tom Davies’ penalty onto the post before centre-back Jimmy Dunne stepped up to send Mark Warburton’s side through.
Across west London, Fulham were involved in a shootout of their own after their meeting with Premier League Leeds ended goalless.
However, Marco Silva’s men could not match the upset at the Kiyan Prince Foundation Stadium as Illan Meslier made the crucial save from Rodrigo Muniz to keep Marco Bielsa’s side in the competition.
Brentford, by contrast, made light work of their third round tie as they hammered an Oldham side sat bottom of the Football League 7-0 as they seek another cup run off the back of last season’s march to the semi-finals.
Thomas Frank had made 11 changes to his side following their superb win away at Wolves on Saturday but the overhaul did little to stem the momentum of the Bees’ superb start to the Premier League season.
Finnish strike Marcus Forss stole the headlines with four goals, including a first-half hat-trick, as Frank’s men went into the interval five goals to the good, while summer signing Yoane Wissa found the net twice, the second a magnificent overhead kick to cap the rout.