Sheffield United moved to within three points of Sky Bet Championship leaders Leeds following a 2-1 win at QPR.