"My time at United will last in my heart for the rest of my life," he told ManUtd.com.
"It’s been a great privilege to be part of such a great team, to have won so much and to have played with special teammates and for the greatest manager in the game.
"I would like to thank everybody at the club who give their best every single day to put every player in the best condition to enjoy their football and achieve success."
He added: “The fans have been fantastic to me and I will always remember them with great affection.
"Now, I’m looking forward to giving everything for a new challenge at QPR, where I will bring all my ambition and spirit I have gathered at United. [Those qualities] will be with me forever."