The new deal will keep the 24-year-old at Loftus Road until the summer of 2013.
“I fought tooth and nail to keep Heidar here over the summer, because I knew he could be a threat for us in the Premier League,” QPR manager Neil Warnock told the club’s website.
“He’s proved time and again what a good player he is.
“He’s more than earned this new deal. No-one deserves it more.
“He’s a credit to his profession and it couldn’t happen to a nicer lad.”
He added: “We know he’s not going to play every game at his age, which is why we need to add to our options in that department.
“It’s something we’re working on and we’re quite hopeful we’ll be successful in our pursuit.”