Rangers had a bid turned down for the Brazilian earlier in the week, but has now reached an agreement with their London rivals.
Alex has also been linked with Paris St Germain and Juventus.
Reports have suggested he is keen to leave England and QPR boss Mark Hughes could face a battle to convince the 29-year-old to remain in the Premier League.