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.
Rangers may have to pay training compensation fees to Blackburn, who have so far reportedly turned down a straigh 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."
Hughes could barely contain his excitement at adding Hoilett to his ranks.
He told www.qpr.co.uk: "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.
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."