Hoilett becomes Mark Hughes' seventh summer signing, as he follows Rob Green, Ryan Nelsen, Fabio Da Silva, Ji-Sung Park, Samba Diakite and Andy Johnson in joining the Loftus Road side.
The Canadian was a free agent after rejecting a new deal at Blackburn Rovers, following their relegation to the Championship, and has chosen the Hoops ahead of German heavyweights Borussia Monchengladbach.
The west London club may have to pay training compensation fees to Blackburn, who have so far reportedly turned down a straight payment of £4 million and a further offer of £2 million plus the out-of-favour Jamie Mackie.
Under FIFA rules, Rovers are entitled to compensation for the Canadian-born forward, who joined their academy at the age of 13. Rovers boss Steve Kean recently pointed to Daniel Sturridge's transfer from Manchester City to Chelsea in 2009 for £6 million as proof that his side should be compensated properly.
Kean said: "I don't know the process now. They might make us an offer for his registration but if not it might go to a tribunal.
"We feel we have played a large part in his development. We wish him all the best but it would have been nice if we had a call.
"I don't know what the figure was for Daniel Sturridge, but I know it was a chunky figure. We have had Junior a long time, we have put a lot of time and effort in him and I'm sure that will be reflected in the price."
QPR manager Hughes has stated he is delighted with the deal, and that Hoilett is a "top quality" addition to the ranks.
He told the club's official website: "He's shown he's a player of top quality and a player that can makes things happen, both on his own and as a team player.
"He's certainly a player that will enhance what we've got in the group and I am delighted he's chosen to come to us."
Hoilett also expressed his delight at sealing a deal with the club, stating that their ambition was a major factor in his decision to join.
He said: "QPR are a club that are certainly heading in the right direction. The ambition to take this club to the next level was something I really wanted to be part of.
"The manager and the owners have huge ambitions to achieve things here and this is the perfect place for me to further my career.
"I'm really happy to be here and can't wait to pull on the Rangers shirt."