The 34-year-old had two years left on the deal he signed at Loftus Road after arriving on a free transfer from Inter Milan in August 2012.
Cesar, who played in all of Brazil's games in their run to the World Cup semi-finals, had not played a game for Rangers since April 2013 and made only 27 starts in total for Harry Redknapp's side.
He spent the latter part of last season on loan at MLS side Toronto, making seven appearances before returning to QPR after the World Cup.
But with former England international Robert Green firmly established as QPR's first-choice, Cesar has left in search of regular first-team football.
Slovenia goalkeeper Jan Oblak ended last season as Benfica's first-choice between the posts but left the club to join Atletico Madrid earlier this summer as a replacement for Thibaut Cortois, who returned to Chelsea after three seasons on loan in the Spanish capital.
Cesar won five Serie A titles and the Champions League with Inter Milan.