Manager Harry Redknapp has decided to offer the 31-year-old, who left Sporting Lisbon at the end of last season, a place in the team following a trial at Loftus Road.
"QPR are a club with huge ambitions to return to the Premier League and I wanted to be part of it," Onyewu told the club's official website.
"I had a really good feeling about QPR from the moment I arrived here. I've been welcomed by the club and I feel good here already.
"I've already integrated well into the group, so I'm looking forward to what will hopefully be a very successful and happy time here."
The defender, who has earned 68 caps for the USA, spent a loan spell at Newcastle United in 2007.