The 25-year-old left-back has been unable to play in the Premier League after his registration was withheld due to Pompey's financial problems.
A number of Championship clubs, including Swansea, were interested in taking Tosic but the former Werder Bremen player has opted to link up with Warnock at Loftus Road.
"I am delighted to be here," Tosic told the club's official website. "All I want to do is play games and hopefully I will get that chance here with Queens Park Rangers.
"I didn't want to play for any Championship team, it had to be right. I have watched a couple of QPR matches and there are some very good players here. The club has a great tradition also, which is important."