The 18-year-old winger, whose current contract was due to expire in the summer, has been rewarded after a breakthrough season.
He returned to Loftus Road last month following loan spells in League 1 with Oldham and Coventry and was named on the bench by Rs boss Harry Redknapp for the Championship fixtures against Middlesbrough and Blackpool.
"I'm really pleased to have signed for another three years," Petrasso told QPR's official website. "It's a really exciting time for me and my family.
"Going out on loan helped my confidence a lot. It was my first time playing league football and it helped a lot.
"Being around the first team has also been a great experience. It's a tight race to get to the Premier League and I'm just hoping I can be a part of it."
Petrasso has been a standout performer at U21 level, scoring nine goals in 13 games.