The 30-year-old, who can play out wide or up front, has scored 50 goals in almost 250 career appearances.
Webber started off as a trainee at Manchester United before moving to Watford and then joining the Blades.
He also spent two seasons with Portsmouth but has not featured competitively since his contract at Fratton Park expired last summer.
Webber worked with Neil Warnock during his time at Bramall Lane, and he also trained with his new manager at QPR earlier this season.
Warnock was keen to strengthen his forward line following the unexpected return of Andros Townsend to Tottenham and he said: "I know the player well and he'll be good to have around the place."