You don't have to live in Qatar.. It is the Islamic Law. To my knowledge it does not matter if you get custody the baby can not be separated from the father(of course special circumstances apply) So you will have to live where the father is.
But then again I am not a professional so I might be wrong