The home side opened the scoring in the 19th minute after a poor clearance from a corner reached McCarthy, whose well-struck volley took a deflection before beating goalkeeper Rob Green.
Defender Ryan Nelsen equalized for the visitors in the 26th when he headed in Adel Taarabt's corner, and QPR took the lead when Djibril Cisse turned in a cross by Shaun Wright-Phillips in the 71st.
But the lead lasted just three minutes with McCarthy equalizing from inside the penalty area.
QPR remains bottom of the table with seven points, eight behind Wigan in 17th.